Affiliation
What University / Laboratory / Company are you from, if any?
TAE Technologies
Description
A description of the feature or enhancement you would like to see.
Add set +e at the beginning of setup.sh, i.e.
https://github.com/MDSplus/mdsplus/blob/alpha/setup.sh#L63-L69
#
set +e
if [ -z "$EXPORTCMD" ]
then
awkexportcmd="export \" \$1 \" ;\""
else
awkexportcmd="export \" \$1 \" ; $EXPORTCMD \" \$1 \" \$\" \$1 \" ;\""
fi
Example
An example of the feature you would like, using pseudocode if helpful.
Additional context
Add any other context or screenshots about the feature request here.
It is useful to initialize MDSplus inside an Lmod module , e.g.
source_sh("/bin/bash", "/usr/local/mdsplus/setup.sh")
However, source_sh explicitly runs with set -e and subprocesses in MDSplus's setup.sh can return non-zero exit status (e.g. line 198 pyver="$(python -V 2>&1)"), resulting in errors similar to:
Lmod has detected the following error: Error found in sourcing script "/usr/local/mdsplus/setup.sh":
If this is a bash script please try:
$ set -exv; . /usr/local/mdsplus/setup.sh
See https://lmod.readthedocs.io/en/latest/260_sh_to_modulefile.html for details.
While processing the following module(s):
Module fullname Module Filename
--------------- ---------------
mds /Users/rclary/Documents/Repos/TAE/tae-dev/mds.lua
Since setup.sh uses $? for flow control but does not require exiting on error, adding set +e at the beginning of setup.sh allows Lmod to handle the script without issue and should not alter the behavior in other contexts.
Affiliation
What University / Laboratory / Company are you from, if any?
TAE Technologies
Description
A description of the feature or enhancement you would like to see.
Add
set +eat the beginning ofsetup.sh, i.e.https://github.com/MDSplus/mdsplus/blob/alpha/setup.sh#L63-L69
Example
An example of the feature you would like, using pseudocode if helpful.
Additional context
Add any other context or screenshots about the feature request here.
It is useful to initialize MDSplus inside an Lmod module , e.g.
However,
source_shexplicitly runs withset -eand subprocesses in MDSplus'ssetup.shcan return non-zero exit status (e.g. line 198pyver="$(python -V 2>&1)"), resulting in errors similar to:Since
setup.shuses$?for flow control but does not require exiting on error, addingset +eat the beginning ofsetup.shallows Lmod to handle the script without issue and should not alter the behavior in other contexts.