bugfix for module_cmd (#5038)
* bugfix for modulecmd when bash is symlinked to sh * update test to make sure module_cmd can interpret sh
This commit is contained in:
parent
faeb1b77b2
commit
79f9548a9a
@ -112,7 +112,7 @@ def test_get_module_cmd_from_bash_ticks(save_env):
|
||||
|
||||
|
||||
def test_get_module_cmd_from_bash_parens(save_env):
|
||||
os.environ['BASH_FUNC_module()'] = '() { eval $(echo fill bash $*)\n}'
|
||||
os.environ['BASH_FUNC_module()'] = '() { eval $(echo fill sh $*)\n}'
|
||||
|
||||
module_cmd = get_module_cmd()
|
||||
module_cmd_list = module_cmd('list', output=str, error=str)
|
||||
|
@ -97,7 +97,7 @@ def get_module_cmd_from_bash(bashopts=''):
|
||||
module_cmd = which(args[0])
|
||||
if module_cmd:
|
||||
for arg in args[1:]:
|
||||
if arg == 'bash':
|
||||
if arg in ('bash', 'sh'):
|
||||
module_cmd.add_default_arg('python')
|
||||
break
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user