Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Fix postinstall when nativescript is not in the PATH #293

Conversation

rosen-vladimirov
Copy link
Contributor

In case nativescript is not in the PATH variable, trying to execute nativescript --version will fail and the rest of the postinstall will not be executed.
For example on many test environments, where different CLI versions are tested, CLI is installed in a directory and executed directly from there.
Also this breaks adding the plugin with AppBuilder CLI (and other AppBuilder clients).

So try-catch the execution.

In case `nativescript` is not in the PATH variable, trying to execute `nativescript --version` will fail and the rest of the postinstall will not be executed.
For example on many test environments, where different CLI versions are tested, CLI is installed in a directory and executed directly from there.
Also this breaks adding the plugin with AppBuilder CLI (and other AppBuilder clients).

So try-catch the execution.
@rosen-vladimirov
Copy link
Contributor Author

ping @EddyVerbruggen

@EddyVerbruggen
Copy link
Owner

Hi @rosen-vladimirov, that's a great idea and fix. Thank you!

@EddyVerbruggen EddyVerbruggen merged commit be46ef8 into EddyVerbruggen:master Feb 21, 2017
EddyVerbruggen pushed a commit that referenced this pull request Feb 21, 2017
…master file (postinstall.js is generated by webpack from installer.js)
@EddyVerbruggen EddyVerbruggen added this to the 3.10.1 milestone Feb 22, 2017
EddyVerbruggen added a commit that referenced this pull request Apr 18, 2017
Fix postinstall when nativescript is not in the PATH
EddyVerbruggen added a commit that referenced this pull request Apr 18, 2017
…master file (postinstall.js is generated by webpack from installer.js)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants