fix: 修复 deploy 脚本参数解析逻辑
Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user