-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
Bugthing that needs fixingthing that needs fixing
Description
Original issue: ember-cli/ember-cli#6970
Parsing options issues for a string with "options"
node test.js foo bar --options '--split 2 --random'
Issue after: 651d447.
https://regex101.com/r/aoa7GZ/1
Example test.js:
var nopt = require("nopt")
var knownOpts = { options: String };
var parsed = nopt( knownOpts, {}, process.argv, 0)
console.log("parsed: ", parsed);
console.log("parsed.options: ", parsed.options);3.0.x
node test.js foo bar --options '--split 2 --random'
parsed: { options: '--split 2 --random',
argv:
{ remain: [],
cooked: [ '--options', '--split 2 --random' ],
original: [ '--options', '--split 2 --random' ] } }
parsed.options: --split 2 --random
4.0.X:
node test.js foo bar --options '--split 2 --random'
parsed: { options: '',
'split 2 --random': true,
argv:
{ remain: [],
cooked: [ '--options', '--split 2 --random' ],
original: [ '--options', '--split 2 --random' ] } }
parsed.options:
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixing