Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix for module_cmd #5038

Merged
merged 2 commits into from
Aug 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/spack/spack/test/module_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/spack/spack/util/module_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down