argparse: allow to specify build [PACKAGE] -w
This commit is contained in:
parent
c10d5cf115
commit
ae6b00c24c
@ -365,12 +365,12 @@ export function argparse<T extends ArgsConfig>(
|
||||
continue
|
||||
}
|
||||
const isPositional = argument.substring(0, 1) !== '-' || onlyPositionals
|
||||
if (isPositional) {
|
||||
onlyPositionals = true
|
||||
}
|
||||
const argName = !isPositional
|
||||
? processFlags(argument)
|
||||
: getNextPositional(argument)
|
||||
if (isPositional && positional.length) {
|
||||
onlyPositionals = true
|
||||
}
|
||||
const argConfig = config[argName]
|
||||
if (!isPositional && argName === 'help') {
|
||||
log(help(command, config, description))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user