diff --git a/scripts/deploy.ts b/scripts/deploy.ts index b65037c..2693cf8 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -43,10 +43,13 @@ function parseArgs() { return Number(getOption(name, String(defaultValue))); }; + // 判断是否是子命令模式 + const isSubCommand = command === 'delete' || command === 'status'; + return { command, - name: args[1], - image: args[2], + name: isSubCommand ? args[1] : command, + image: isSubCommand ? undefined : args[1], options: { replicas: getOptionNumber('--replicas', 1), port: getOptionNumber('--port', 3000),