Skip to content

Commit

Permalink
fix: 修正路径中间包含空格报错 (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
fennghuang authored Nov 28, 2023
1 parent a00b20f commit 98f172d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/server/services/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const exec = util.promisify(require('child_process').exec);
const scriptsPath = path.resolve('packages/scripts');

export default async function execScript(params: BaseObject) {
const script = `node ${scriptsPath}/download.js && node ${scriptsPath}/index.js ${params.commandLine}`;
const script = `node '${scriptsPath}/download.js' && node '${scriptsPath}/index.js' ${params.commandLine}`;
const { stdout, stderr } = await exec(script);
console.log('Execute:', script);
console.log('stdout:', stdout);
Expand Down

0 comments on commit 98f172d

Please sign in to comment.