From 94acd8f235d8131939a2485dae7fc98177b87901 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 24 Feb 2020 16:46:41 +0100 Subject: 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` ``` --- lib/spack/spack/cmd/load.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3-70-g09d2