Skip to content
Snippets Groups Projects

Fix running from non-standard mounts like /eos/user

Merged Chris Burr requested to merge cburr/fixes into master
2 files
+ 21
4
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 8
0
@@ -184,12 +184,20 @@ def check_apptainer(results):
def run_cmd(results, command):
cmd = join_cmd(command)
# Having PWD set causes some versions of apptainer to ignore the current
# working directory and, if the path in PWD contains symlinks, apptainer can
# fail to set the current working directory correctly and default to $HOME.
env = os.environ.copy()
env.pop("PWD", None)
try:
proc = subprocess.Popen(
command,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True,
env=env,
)
stdout, stderr = proc.communicate()
except FileNotFoundError:
Loading