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
|
continue
|
||||||
}
|
}
|
||||||
const isPositional = argument.substring(0, 1) !== '-' || onlyPositionals
|
const isPositional = argument.substring(0, 1) !== '-' || onlyPositionals
|
||||||
if (isPositional) {
|
|
||||||
onlyPositionals = true
|
|
||||||
}
|
|
||||||
const argName = !isPositional
|
const argName = !isPositional
|
||||||
? processFlags(argument)
|
? processFlags(argument)
|
||||||
: getNextPositional(argument)
|
: getNextPositional(argument)
|
||||||
|
if (isPositional && positional.length) {
|
||||||
|
onlyPositionals = true
|
||||||
|
}
|
||||||
const argConfig = config[argName]
|
const argConfig = config[argName]
|
||||||
if (!isPositional && argName === 'help') {
|
if (!isPositional && argName === 'help') {
|
||||||
log(help(command, config, description))
|
log(help(command, config, description))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user