GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: wrong script path in production · EM-GeekLab/LLMOne@666a26d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/ssh
    • ssh-controller.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/ssh/ssh-controller.ts‎

Copy file name to clipboardExpand all lines: lib/ssh/ssh-controller.ts
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,11 @@ export class MxaCtl {
381381

382382
async execScriptFile(file: string, options: CtlExecOptions = {}) {
383383
const { sudo = !this.isRootUser(), ...restOptions } = options
384-
if (!existsSync(file)) {
385-
throw new Error(`文件 ${file} 不存在`)
384+
const fullPath = join(rootDir, file)
385+
if (!existsSync(fullPath)) {
386+
throw new Error(`文件 ${file} 不存在: ${fullPath}`)
386387
}
387-
const fileContent = await readFile(join(rootDir, file), { encoding: 'utf8' })
388+
const fileContent = await readFile(fullPath, { encoding: 'utf8' })
388389
if (sudo) {
389390
const res = await this.ssh.exec('sudo', ['bash', '-c', fileContent], {
390391
...this.execOptions({ sudo, ...restOptions }),

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.