Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-14074] Fixed bug with CLI arg parser not properly removing the node process from the arguments. #44

Merged
merged 2 commits into from
Jun 5, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
-------------------
* Added better error handling with logging in and out of the Appc network; saving cli config [TIMOB-13908]
* Added ID for each installed Android SDK and add-on to info command output [TIMOB-13797]
* Fixed bug with CLI argument parser not properly removing the node process from the arguments [TIMOB-14074]

3.1.1
-------------------
Expand Down
9 changes: 6 additions & 3 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,12 @@ cli.parse = function (finished) {
idx,
file,
cd,
completion = !!config.cli.completion;

args[0].slice(-4) === 'node' && args.shift();
completion = !!config.cli.completion,
prog = args[0].replace(/\\/g, '/').split('/').pop();

// strip the node executable from the args
(prog == 'node' || prog == 'node.exe') && args.shift();

cd = path.dirname(file = args[0]);

try {
Expand Down