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`
```
This commit is contained in:
Michael Kuhn 2020-02-24 16:46:41 +01:00 committed by GitHub
parent a38eb70e30
commit 94acd8f235
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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