Invokes subshell without user init scripts.
This commit is contained in:
parent
5bb2d3baa0
commit
dc7e0899a0
@ -27,7 +27,8 @@ def _target_from_clean_env(name):
|
|||||||
# CAUTION - $USER is generally needed to initialize the environment.
|
# CAUTION - $USER is generally needed to initialize the environment.
|
||||||
# There may be other variables needed for general success.
|
# There may be other variables needed for general success.
|
||||||
output = env('USER=%s' % os.environ['USER'],
|
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)
|
output=str, error=str)
|
||||||
pattern = 'craype-(?!{0})(\S*)'.format('|'.join(NON_TARGETS))
|
pattern = 'craype-(?!{0})(\S*)'.format('|'.join(NON_TARGETS))
|
||||||
for line in output.splitlines():
|
for line in output.splitlines():
|
||||||
|
Loading…
Reference in New Issue
Block a user