diff options
author | Michael Kuhn <michael.kuhn@informatik.uni-hamburg.de> | 2020-02-24 16:46:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-24 09:46:41 -0600 |
commit | 94acd8f235d8131939a2485dae7fc98177b87901 (patch) | |
tree | 9879341f104c17b8a65b8dd3d8916cec8717f098 | |
parent | a38eb70e305e94efac0af9a781479a65650c184e (diff) | |
download | spack-94acd8f235d8131939a2485dae7fc98177b87901.tar.gz spack-94acd8f235d8131939a2485dae7fc98177b87901.tar.bz2 spack-94acd8f235d8131939a2485dae7fc98177b87901.tar.xz spack-94acd8f235d8131939a2485dae7fc98177b87901.zip |
cmd/load: Fix usage output (#15180)
args.specs is a list, which results in output like this:
```
eval `spack load --sh ['libxml2', 'xz']`
```
We want this instead:
```
eval `spack load --sh libxml2 xz`
```
-rw-r--r-- | lib/spack/spack/cmd/load.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/spack/spack/cmd/load.py b/lib/spack/spack/cmd/load.py index 09f3fd31ee..9a00ad1c58 100644 --- a/lib/spack/spack/cmd/load.py +++ b/lib/spack/spack/cmd/load.py @@ -51,6 +51,7 @@ def load(parser, args): for spec in spack.cmd.parse_specs(args.specs)] if not args.shell: + specs_string = ' '.join(args.specs) msg = [ "This command works best with Spack's shell support", "" @@ -58,8 +59,8 @@ def load(parser, args): 'Or, if you want to use `spack load` without initializing', 'shell support, you can run one of these:', '', - ' eval `spack load --sh %s` # for bash/sh' % args.specs, - ' eval `spack load --csh %s` # for csh/tcsh' % args.specs, + ' eval `spack load --sh %s` # for bash/sh' % specs_string, + ' eval `spack load --csh %s` # for csh/tcsh' % specs_string, ] tty.msg(*msg) return 1 |