Merge pull request #18 from nuomiaa/master

修正 字符错误
This commit is contained in:
Suwings 2022-03-17 15:35:45 +08:00 committed by GitHub
commit e9714ba33b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,7 +91,7 @@ export default class GeneralStartCommand extends InstanceCommand {
// 命令解析
const commandList = commandStringToArray(instance.config.startCommand);
const commandExeFile = commandList[0];
const commnadParameters = commandList.slice(1);
const commandParameters = commandList.slice(1);
if (commandList.length === 0) {
return instance.failure(new StartupError("无法启动实例,启动命令为空"));
}
@ -105,7 +105,7 @@ export default class GeneralStartCommand extends InstanceCommand {
// 创建子进程
// 参数1直接传进程名或路径含空格无需双引号
const process = spawn(commandExeFile, commnadParameters, {
const process = spawn(commandExeFile, commandParameters, {
cwd: instance.config.cwd,
stdio: "pipe",
windowsHide: true
@ -124,7 +124,7 @@ ${instance.config.startCommand}
:
${commandExeFile}
${JSON.stringify(commnadParameters)}
${JSON.stringify(commandParameters)}
`