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

Cordova binary path cannot be overrided #27

Open
dvasconcelos opened this issue Apr 3, 2018 · 7 comments
Open

Cordova binary path cannot be overrided #27

dvasconcelos opened this issue Apr 3, 2018 · 7 comments

Comments

@dvasconcelos
Copy link

Hello,

On my project, I installed cordova in my npm devDependencies and I would like to specify the cordova binary to use in the fastlane command "./node_modules/.bin/cordova".
Is it possible to add a new parameter to be able to specify the Cordova binary path.

Regards,
Dominique

@janpio
Copy link

janpio commented Apr 3, 2018

This plugin is using whatever is called by executing cordova on the command line. If you want to supply the "binary" as an option, this would have to be changed.

If there maybe another way to achieve this?

@dvasconcelos
Copy link
Author

For now, I changed my PATH environment variable to target the correct binary.

@CameronAM
Copy link
Contributor

CameronAM commented Mar 20, 2019

@janpio - you should call the cordova binary using npx (available since [email protected]). Eg: npx cordova compile...

@janpio
Copy link

janpio commented Mar 21, 2019

Is the "order" of how npx discovers the correct package documented somewhere? local, global, ad-hoc download?

@CameronAM
Copy link
Contributor

https://www.npmjs.com/package/npx

It checks if a command:

  1. Exists on the path
  2. Exists in node_modules/.bin

And calls the first one it finds.

If it does not find the command, it will automatically fetch and run the command from a temporary installation (if not supresssed with --no-install).

Just thinking now, it's probably a good idea to add --no-install to the PR changes to avoid surprising installations - would you like me to make that change?

@janpio
Copy link

janpio commented Mar 22, 2019

That sounds like a good idea. And thanks for the explanation.

@CameronAM
Copy link
Contributor

@janpio - sorry about the delay, #45 has been updated.

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

No branches or pull requests

3 participants