RHEL8 bugfix for module_cmd (#14349)
This commit is contained in:
parent
ba0e144b07
commit
c3c1cf13e7
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
||||||
"""
|
"""
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
@ -31,7 +32,7 @@ def module(*args):
|
||||||
if args[0] in module_change_commands:
|
if args[0] in module_change_commands:
|
||||||
# Do the module manipulation, then output the environment in JSON
|
# Do the module manipulation, then output the environment in JSON
|
||||||
# and read the JSON back in the parent process to update os.environ
|
# and read the JSON back in the parent process to update os.environ
|
||||||
module_cmd += ' >/dev/null; python -c %s' % py_cmd
|
module_cmd += ' >/dev/null;' + sys.executable + ' -c %s' % py_cmd
|
||||||
module_p = subprocess.Popen(module_cmd,
|
module_p = subprocess.Popen(module_cmd,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.STDOUT,
|
stderr=subprocess.STDOUT,
|
||||||
|
|
Loading…
Reference in a new issue