-
Notifications
You must be signed in to change notification settings - Fork 744
Description
Node version (or tell us if you're using electron or some other framework): 8.1.4
ShellJS version (the most recent version/Github branch you see the bug on): 0.7.8
Operating system: macOS 10.12.6
Description of the bug:
In a CI environment (CircleCI), my company is required to set both the registry and the https-proxy of the .npmrc file. These settings are not carried into the environment shelljs operates in. I know this because I start getting timeouts when trying to run yarn or npm install when running via shell.exec
Example ShellJS command to reproduce the error:
I can't provide exact registries or proxies since they are internal, so I will provide the "scenario" or "conditions" under which this would happen.
npm config set registry https://registry.npmjs.company.net
npm config set https-proxy http://special.proxy.here
yarn testAnd yarn test would run some script that had
shell.cd(project); // This is a project we cloned into the existing project
shell.exec(`yarn`);In this case, ShellJS's environment will not have the registry variables we set. In addition, running -g for the registry variables does not fix the issue. At this point, the only solution is to have shelljs set the registry again in the script. This defeats the purpose of setting it outside of the script.