From dc7e0899a05cf4464552f4b3d41005e79571a15a Mon Sep 17 00:00:00 2001 From: Matt Belhorn Date: Sat, 30 Jul 2016 11:38:34 -0400 Subject: [PATCH] Invokes subshell without user init scripts. --- lib/spack/spack/platforms/cray.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/platforms/cray.py b/lib/spack/spack/platforms/cray.py index dc959c7eaf..fd58915c57 100644 --- a/lib/spack/spack/platforms/cray.py +++ b/lib/spack/spack/platforms/cray.py @@ -27,7 +27,8 @@ def _target_from_clean_env(name): # CAUTION - $USER is generally needed to initialize the environment. # There may be other variables needed for general success. output = env('USER=%s' % os.environ['USER'], - '/bin/bash', '-l', '-c', 'module list -lt', + '/bin/sh', '--noprofile', '-c', + 'source /etc/profile; module list -lt', output=str, error=str) pattern = 'craype-(?!{0})(\S*)'.format('|'.join(NON_TARGETS)) for line in output.splitlines():