fix: 修复 deploy 脚本参数解析逻辑

Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
D8D Developer
2026-03-20 10:21:41 +00:00
parent fec235eade
commit d901603148

View File

@@ -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),