Skip to content
Snippets Groups Projects
Commit 33aa06e1 authored by Massimiliano Culpo's avatar Massimiliano Culpo Committed by Todd Gamblin
Browse files

shell: fixed a typo in spack --print-shell-vars (#8732)

parent 111512ce
No related branches found
No related tags found
No related merge requests found
...@@ -589,9 +589,9 @@ def shell_set(var, value): ...@@ -589,9 +589,9 @@ def shell_set(var, value):
if 'modules' in info: if 'modules' in info:
specs = spack.store.db.query('environment-modules') specs = spack.store.db.query('environment-modules')
if specs: if specs:
shell_set('module_prefix', specs[-1].prefix) shell_set('_sp_module_prefix', specs[-1].prefix)
else: else:
shell_set('module_prefix', 'not_installed') shell_set('_sp_module_prefix', 'not_installed')
def main(argv=None): def main(argv=None):
......
...@@ -32,7 +32,7 @@ def test_print_shell_vars_sh(capsys): ...@@ -32,7 +32,7 @@ def test_print_shell_vars_sh(capsys):
assert "_sp_sys_type=" in out assert "_sp_sys_type=" in out
assert "_sp_tcl_root=" in out assert "_sp_tcl_root=" in out
assert "_sp_lmod_root=" in out assert "_sp_lmod_root=" in out
assert "module_prefix" not in out assert "_sp_module_prefix" not in out
def test_print_shell_vars_csh(capsys): def test_print_shell_vars_csh(capsys):
...@@ -42,7 +42,7 @@ def test_print_shell_vars_csh(capsys): ...@@ -42,7 +42,7 @@ def test_print_shell_vars_csh(capsys):
assert "set _sp_sys_type = " in out assert "set _sp_sys_type = " in out
assert "set _sp_tcl_root = " in out assert "set _sp_tcl_root = " in out
assert "set _sp_lmod_root = " in out assert "set _sp_lmod_root = " in out
assert "set module_prefix = " not in out assert "set _sp_module_prefix = " not in out
def test_print_shell_vars_sh_modules(capsys): def test_print_shell_vars_sh_modules(capsys):
...@@ -52,7 +52,7 @@ def test_print_shell_vars_sh_modules(capsys): ...@@ -52,7 +52,7 @@ def test_print_shell_vars_sh_modules(capsys):
assert "_sp_sys_type=" in out assert "_sp_sys_type=" in out
assert "_sp_tcl_root=" in out assert "_sp_tcl_root=" in out
assert "_sp_lmod_root=" in out assert "_sp_lmod_root=" in out
assert "module_prefix=" in out assert "_sp_module_prefix=" in out
def test_print_shell_vars_csh_modules(capsys): def test_print_shell_vars_csh_modules(capsys):
...@@ -62,4 +62,4 @@ def test_print_shell_vars_csh_modules(capsys): ...@@ -62,4 +62,4 @@ def test_print_shell_vars_csh_modules(capsys):
assert "set _sp_sys_type = " in out assert "set _sp_sys_type = " in out
assert "set _sp_tcl_root = " in out assert "set _sp_tcl_root = " in out
assert "set _sp_lmod_root = " in out assert "set _sp_lmod_root = " in out
assert "set module_prefix = " in out assert "set _sp_module_prefix = " in out
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment