CB-10443 Pass original options instead of remaining

Nopt parses all options regardless of what is passed as "knownOpts". This leaves the remain property an emtpy array.
This ultimately leads to a bug in the parseOpts function where the options undergo a second parsing from nopt.
The end result is - this options are not respected at all..
This closes #248
This commit is contained in:
Dimitar Kerezov 2016-01-28 09:51:50 +02:00 committed by Vladimir Kotikov
parent 1494082a2a
commit 7669378c6e

View File

@ -39,7 +39,7 @@ var buildOpts = nopt({
}, { 'd' : '--verbose' });
// Make buildOptions compatible with PlatformApi build method spec
buildOpts.argv = buildOpts.argv.remain;
buildOpts.argv = buildOpts.argv.original;
new Api().build(buildOpts)
.catch(function(err) {