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
2.4.2
BootStrap: docker From: alpine:latest
%test [[ -z "$THIS_IS_A_TEST" ]] && echo "Environment is not loaded." >&2 echo "test: THIS_IS_A_TEST=$THIS_IS_A_TEST"
%runscript [[ -z "$THIS_IS_A_TEST" ]] && echo "Environment is not loaded." >&2 echo "runscript: THIS_IS_A_TEST=$THIS_IS_A_TEST"
%post apk update apk add bash echo 'export THIS_IS_A_TEST=TRUE' >> /environment
###Actual Behavior
The text was updated successfully, but these errors were encountered:
Hi @sylabskeith
$ singularity test test.img test: THIS_IS_A_TEST=TRUE
Running test scriptlet + [[ -z ]] + echo Environment is not loaded. Environment is not loaded. + echo test: THIS_IS_A_TEST= test: THIS_IS_A_TEST=
This is by design from a change implemented in #1071 where the rationale was discussed in #1053 - environment is no longer sourced during the build.
Sorry, something went wrong.
@sylabskeith - closing this as the fix for behaviour (2) has been merged, and (1) is by design, as above. Let us know if any further issue. Thanks.
No branches or pull requests
Version of Singularity:
2.4.2
Expected behavior
BootStrap: docker
From: alpine:latest
%test
[[ -z "$THIS_IS_A_TEST" ]] && echo "Environment is not loaded." >&2
echo "test: THIS_IS_A_TEST=$THIS_IS_A_TEST"
%runscript
[[ -z "$THIS_IS_A_TEST" ]] && echo "Environment is not loaded." >&2
echo "runscript: THIS_IS_A_TEST=$THIS_IS_A_TEST"
%post
apk update
apk add bash
echo 'export THIS_IS_A_TEST=TRUE' >> /environment
###Actual Behavior
The text was updated successfully, but these errors were encountered: