-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
Cannot retrieve unmodified argument to nave use
from environment
#123
Comments
Hmm it'd have to be something other than |
So if I add a named environment and say |
Yup! $ nave use my-named-env 16 bash -c 'echo $NAVENAME'
Creating new env named 'my-named-env' using node 16.19.0
my-named-env |
Once it's created, you don't have to specify a version (or you don't have to initially, but it'll prompt you if it doesn't exist already). So, if it doesn't exist, it's not 100% headless (though you can Also,
|
Shipped 3.5.0, which now sets In the case of One weird side effect of this is that if you don't supply a version, and the named env doesn't yet exist, then it'll prompt the user for an argument but will not set |
eg: $ nave use new-named-env bash -c 'echo nva=$NAVEVERSIONARG'
What version of node? 16
Creating new env named 'new-named-env' using node 16.19.0
nva=16.19.0 # <-- would expect "16" here, not "16.19.0" |
If it is reliably set the original version argument given to |
The issue is that the argument isn't stored anywhere after the first setup command. So all we know at the point of |
It seems that scripts ran by nave, likely including
.naverc
, have no way of accessing the original unmodified version choice argument passed tonave use
. This is probably a bug; specifically, my intuition is that the$NAVENAME
environment variable should contain this unmodified argument.The text was updated successfully, but these errors were encountered: