Skip to content

[OSX] No validation for command options #251

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

Closed
dtopuzov opened this issue Feb 26, 2015 · 5 comments · Fixed by #321
Closed

[OSX] No validation for command options #251

dtopuzov opened this issue Feb 26, 2015 · 5 comments · Fixed by #321
Assignees
Labels
Milestone

Comments

@dtopuzov
Copy link
Contributor

If you have a typo in --frameworkPath CLI defaults to npmjs.org without any error.
If some of the CLI params is wrong I expect error instead of default behavior without error.

@dtopuzov dtopuzov added the bug label Feb 26, 2015
@rosen-vladimirov rosen-vladimirov self-assigned this Feb 26, 2015
@rosen-vladimirov
Copy link
Contributor

This should work fine, could you give some more details how to reproduce the problem.

@dtopuzov
Copy link
Contributor Author

Valication for --frameworkPath is ok on Windows, but when run this on OSX:
tns platform add android --framerowkpaht tns-android.tgz --path TNSApp

Result is:
No error message, platform added (the one from npmjs.org)

Expected:
Error message, because "--framerowkpaht" is not a valid option

@dtopuzov dtopuzov changed the title If you have a typo in --frameworkPath CLI defaults to npmjs.org without any error [OSX] If you have a typo in --frameworkPath CLI defaults to npmjs.org without any error Mar 11, 2015
@dtopuzov
Copy link
Contributor Author

Same applies also for symlink:
tns platform add android --frameworkPath tns-android.tgz --simlink --path TNS_App

Windows: Error message (expected, because there is a typo in --simlink)
OSX: No validation, command executed and --simlink is just ignored

@dtopuzov
Copy link
Contributor Author

Same for:
node_modules/.bin/tns build android --debug --path TNS_App

In Windows environment result is:
The option 'debug' is not supported.

In OSX result is:

shell.js: internal error
Error: ENOENT, no such file or directory '/Users/topuzov/Git/nativescript-cli-tests/TNS_App/platforms/android/assets/App_Resources'
    at Object.fs.mkdirSync (fs.js:653:18)
    at /Users/topuzov/Git/nativescript-cli-tests/node_modules/nativescript/node_modules/shelljs/src/cp.js:174:14
    at Array.forEach (native)
    at Object._cp (/Users/topuzov/Git/nativescript-cli-tests/node_modules/nativescript/node_modules/shelljs/src/cp.js:157:11)
    at Object.cp (/Users/topuzov/Git/nativescript-cli-tests/node_modules/nativescript/node_modules/shelljs/src/common.js:186:23)
    at /Users/topuzov/Git/nativescript-cli-tests/node_modules/nativescript/lib/services/android-project-service.js:101:19
    at Function.settle (/Users/topuzov/Git/nativescript-cli-tests/node_modules/nativescript/node_modules/fibers/future.js:220:26)
    at FiberFuture.Future.wait (/Users/topuzov/Git/nativescript-cli-tests/node_modules/nativescript/node_modules/fibers/future.js:487:10)
    at /Users/topuzov/Git/nativescript-cli-tests/node_modules/nativescript/lib/services/platform-service.js:121:88
    at Function.settle (/Users/topuzov/Git/nativescript-cli-tests/node_modules/nativescript/node_modules/fibers/future.js:220:26)

@dtopuzov dtopuzov changed the title [OSX] If you have a typo in --frameworkPath CLI defaults to npmjs.org without any error [OSX] No validation for command options Mar 11, 2015
@rosen-vladimirov
Copy link
Contributor

It turned out the problem is when you have installed nativescript with -g option
$ npm install -g nativescript
After that our validation for -- is not working correctly when you call tns ...
It is working fine in case you are using " $ nativescript ... "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants