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.
This commit is contained in:
		| @@ -22,7 +22,7 @@ def shell_init_instructions(cmd, equivalent): | |||||||
|     shell_specific = "{sh_arg}" in equivalent |     shell_specific = "{sh_arg}" in equivalent | ||||||
| 
 | 
 | ||||||
|     msg = [ |     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.", |         "To set up shell support, run the command below for your shell.", | ||||||
|         "", |         "", | ||||||
| @@ -49,5 +49,12 @@ def shell_init_instructions(cmd, equivalent): | |||||||
|     else: |     else: | ||||||
|         msg += ["  " + equivalent] |         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 += [''] |     msg += [''] | ||||||
|     tty.error(*msg) |     tty.error(*msg) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Michael Kuhn
					Michael Kuhn