Open sporkd opened 5 years ago
Bump😉 . I would say the desired behavior is for the shell ENV variables loaded in your default shell to always be supplied to hyper so it can correctly process your ~/.npmrc
. This should happen even if you click on the hyper icon, because the intent when doing so is to fire up a terminal and load the config files for your default shell (bash, zsh, etc). Thoughts?
Issue
One nice feature of
.npmrc
is the ability to add shell expansion variables. So for instance you can do something like:~/.npmrc
Where
_auth
will get evaluated to whatever env variable you set forREGISTRY_AUTH_TOKEN
(can verify by runningyarn config list
).This works fine when you start hyper from the command line because it preserves your env variables. However, when clicking on the Hyper.app icon, your shell env variables are not brought in, and plugin installation will fail with something like:
The problem occurs in
yarn-standalone.js
when it tries to substitute the value for an env variable that is not found.yarn-standalone.js:90318
Ideally, the correct shell env would be passed in when clicking on Hyper.app. But alternatively we might not need to throw an error when an env variable is missing because this kind of
~/.npmrc
customization is not relevant to hyper starting up. Or perhaps there is not even a need to parse~/.npmrc
(unless people are publishing custom plugins to private registries or proxying).But at the very least, it seems yarn-standalone.js should continue with plugin install if an env variable can't be found, instead of throwing an error.
There are a few other issues I found related to
~/.npmrc
, but nothing related to shell expansion: