diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2018-07-24 16:12:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-24 16:12:47 -0700 |
commit | 674eb00e53e8d317a4b5c22d26aef2c0c7ec1753 (patch) | |
tree | 52f630dc4322f324094d0fb3ef0d7541ae890b54 | |
parent | 5b8b7a5873672170ce57a84e5d1ca0b0e065d933 (diff) | |
download | spack-674eb00e53e8d317a4b5c22d26aef2c0c7ec1753.tar.gz spack-674eb00e53e8d317a4b5c22d26aef2c0c7ec1753.tar.bz2 spack-674eb00e53e8d317a4b5c22d26aef2c0c7ec1753.tar.xz spack-674eb00e53e8d317a4b5c22d26aef2c0c7ec1753.zip |
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
```
-rw-r--r-- | lib/spack/spack/cmd/module.py | 5 |
1 files changed, 2 insertions, 3 deletions
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) |