From 674eb00e53e8d317a4b5c22d26aef2c0c7ec1753 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 24 Jul 2018 16:12:47 -0700 Subject: bugfix: `spack module -m` error message (#8794) Fix this output error: ``` $ spack -m module loads mpileaks ==> Error: `spack module loads -m t -m c -m l ...` has been moved. Try this instead: $ spack module t loads mpileaks $ spack module c loads mpileaks $ spack module l loads mpileaks ``` --- lib/spack/spack/cmd/module.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/spack/spack/cmd/module.py b/lib/spack/spack/cmd/module.py index ea54f3b691..f9f0586d62 100644 --- a/lib/spack/spack/cmd/module.py +++ b/lib/spack/spack/cmd/module.py @@ -62,14 +62,13 @@ def handle_deprecated_command(args, unknown_args): command = args.module_command unknown = ' '.join(unknown_args) - module_types = args.module_type or 'tcl' + module_types = args.module_type or ['tcl'] - msg = '`spack module {0} {1} ...` has been moved. Try this instead:\n' + msg = '`spack module {0} {1}` has moved. Use these commands instead:\n' msg = msg.format(command, ' '.join('-m ' + x for x in module_types)) for x in module_types: msg += '\n\t$ spack module {0} {1} {2}'.format(x, command, unknown) msg += '\n' - tty.die(msg) -- cgit v1.2.3-70-g09d2