We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the particular setup I'm working on, there is a bash exported function module which is tripping up the environment setup code
module
module () { eval `/usr/bin/modulecmd bash $*` } declare -fx module
It produces the following environment variable definition under printenv
printenv
BASH_FUNC_module()=() { eval `/usr/bin/modulecmd bash $*` }
Which gets translated into the nix-sandbox-rc-... file command
export BASH_FUNC_module()=\(\)\ \{\ \ eval\ \`/usr/bin/modulecmd\ bash\ \$\*\`' '\}
Causing the shell to choke with the error message
/tmp/nix-sandbox-rc-26417EZN line 97 syntax error near unexpected token `('
One solution may be to have nix-create-sandbox-rc just capture and use the output of
nix-create-sandbox-rc
declare -x declare -fx
for the shell script instead of using printenv -0.
printenv -0
Cheers! -Tyson
The text was updated successfully, but these errors were encountered:
Generate sandbox environment script using declare shell command
7db84fd
This closes nix-community#34 as it properly handles exported shell functions.
5f95fb5
Successfully merging a pull request may close this issue.
In the particular setup I'm working on, there is a bash exported function
module
which is tripping up the environment setup codeIt produces the following environment variable definition under
printenv
Which gets translated into the nix-sandbox-rc-... file command
Causing the shell to choke with the error message
One solution may be to have
nix-create-sandbox-rc
just capture and use the output offor the shell script instead of using
printenv -0
.Cheers! -Tyson
The text was updated successfully, but these errors were encountered: