-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fix bug when defining multiple modules in app.cfg #908
Fix bug when defining multiple modules in app.cfg #908
Conversation
…were interpreted as a single string, with space. I.e. only one iteration of hte for loop was executed. Using bash arrays, we no longer have this issue
Instance
|
Instance
|
Instance
|
Instance
|
For me the original version works too 🤷 [trz@login1 ~]$ source /cvmfs/software.eessi.io/versions/2023.06/init/lmod/bash
EESSI/2023.06 loaded successfully
[trz@login1 ~]$ ml
Currently Loaded Modules:
1) EESSI/2023.06
[trz@login1 ~]$ ml av easybuild
----------------------------- /cvmfs/software.eessi.io/versions/2023.06/software/linux/aarch64/neoverse_n1/modules/all ------------------------------
EasyBuild/4.8.2 EasyBuild/4.9.1 EasyBuild/4.9.3 EESSI-extend/2023.06-easybuild
EasyBuild/4.9.0 EasyBuild/4.9.2 EasyBuild/4.9.4 (D)
...
[trz@login1 ~]$ export LOAD_MODULES=EasyBuild/4.9.4,EESSI-extend/2023.06-easybuild
[trz@login1 ~]$ for mod in $(echo ${LOAD_MODULES} | tr ',' '\n'); do echo +$mod+; done
+EasyBuild/4.9.4+
+EESSI-extend/2023.06-easybuild+
[trz@login1 ~]$ IFS=',' read -r -a modules <<< "$(echo "${LOAD_MODULES}")"
[trz@login1 ~]$ for mod in "${modules[@]}"; do echo +$mod+; done
+EasyBuild/4.9.4+
+EESSI-extend/2023.06-easybuild+
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works. Can't reproduce the problem with the original code though.
PR merged! Moved |
1 similar comment
PR merged! Moved |
PR merged! Moved |
PR merged! Moved |
Just as an FYI: I'm not entirely sure why it happened either, I couldn't reproduce it interactively. But what happened was very clear: it was interpreting the |
Fix bug when multiple modules where defined. In the old syntax, they were interpreted as a single string, with space. I.e. only one iteration of hte for loop was executed. Using bash arrays, we no longer have this issue
See #903 (comment)