Skip to content

Commit

Permalink
fix: 修正路径中间包含空格报错
Browse files Browse the repository at this point in the history
  • Loading branch information
fennghuang committed Nov 8, 2023
1 parent 56e36b2 commit 7024b2e
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 7024b2e

Please sign in to comment.