fastlane-plugin-codepush
fastlane-plugin-codepush copied to clipboard
Support running the appcenter-cli using npx
On some systems it might not be possible or feasible to have the CLI application installed globally and instead have it installed locally as part of other npm modules. In such situations when the CLI tool is installed as part of the npm modules locally, it can be called using npx as npx appcenter.
Having this plugin with the ability to run the CLI using npx if found, would be very handy!
As a workaround, the npm binaries path can be added to the global PATH variable before executing this action.
path = ENV.fetch('PATH')
npm_bin = %x[npm bin].strip
ENV.store('PATH', "#{npm_bin}:#{path}")
Although ideally the action should first try running using npx, this will correctly execute the appcenter CLI tool until then.