summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Kuhn <michael.kuhn@ovgu.de>2021-05-04 00:28:28 +0200
committerGitHub <noreply@github.com>2021-05-03 18:28:28 -0400
commit21ad8d4372e2f0ab8ae42185f3207cac2c109b01 (patch)
tree2e29f3bd75e57c51bfeb6fc99edce3c76b80caed /lib
parent5a747b91838d0bbc6ff38359686e3c109cd7fee9 (diff)
downloadspack-21ad8d4372e2f0ab8ae42185f3207cac2c109b01.tar.gz
spack-21ad8d4372e2f0ab8ae42185f3207cac2c109b01.tar.bz2
spack-21ad8d4372e2f0ab8ae42185f3207cac2c109b01.tar.xz
spack-21ad8d4372e2f0ab8ae42185f3207cac2c109b01.zip
cmd: improve shell support help message (#23410)
Users sometimes set up Spack's shell support but still call `bin/spack`, which results in the help message showing up again.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/cmd/common/__init__.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/spack/spack/cmd/common/__init__.py b/lib/spack/spack/cmd/common/__init__.py
index 7cd8c313e0..6ff4faba7c 100644
--- a/lib/spack/spack/cmd/common/__init__.py
+++ b/lib/spack/spack/cmd/common/__init__.py
@@ -22,7 +22,7 @@ def shell_init_instructions(cmd, equivalent):
shell_specific = "{sh_arg}" in equivalent
msg = [
- "`%s` requires spack's shell support." % cmd,
+ "`%s` requires Spack's shell support." % cmd,
"",
"To set up shell support, run the command below for your shell.",
"",
@@ -49,5 +49,12 @@ def shell_init_instructions(cmd, equivalent):
else:
msg += [" " + equivalent]
+ msg += [
+ "",
+ "If you have already set up Spack's shell support but still receive",
+ "this message, please make sure to call Spack via the `spack` command",
+ "without any path components (such as `bin/spack`).",
+ ]
+
msg += ['']
tty.error(*msg)