Closed mmascher closed 1 year ago
Rebased to master Changed the var name to GLIDEIN_CONTAINER_ENV_CLEARLIST (it is not singularity specific, all new variables should use GLIDEINCONTAINER...) Fixed a couple of bugs (unit test, quotes blocking for) TODO about unclear line Specific unit test should be added
Tested this and it does not work. The invocation of env_clear
is done inside parenthesis: $(env_clear)
Therefore, as confirmed by the test script below, the velue of the variable is not going to be unset. Possibly, these two lines are not working as well in the current code and it is why we are clearing them separately here?
Anyway, for the time being I am putting the clearlist stuff in a separate function and giving it a try (see the commit).
Test script:
export A=0
marco@marco-LEGION5:~$ cat tmp.sh
test() {
unset A
}
echo $A
B=$(test)
#test
echo $A
marco@marco-LEGION5:~$ sh tmp.sh
0
0
marco@marco-LEGION5:~$ vim tmp.sh
marco@marco-LEGION5:~$ sh tmp.sh
0
marco@marco-LEGION5:~$ cat tmp.sh
test() {
unset A
}
echo $A
#B=$(test)
test
echo $A
My test were successful with the latest commit
I generalized the functions to take an argument so I could add a unit test for them
Did a force push after rebase to clear merge conflicts (in CHANGELOG.md)
Using the env variable GLIDEIN_CONTAINER_ENV_CLEARLIST to clear env variables. Fixes #341