summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2014-08-16 14:53:57 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2014-08-16 14:53:57 -0700
commit221cf6acb932442f5964243eb3413a1d921920c8 (patch)
tree18648f5438ac402ef44089a126f69891f62110c8 /bin
parent57ddbd282aa58b084c1e2f3a2204a6fb9e7ac6e4 (diff)
downloadspack-221cf6acb932442f5964243eb3413a1d921920c8.tar.gz
spack-221cf6acb932442f5964243eb3413a1d921920c8.tar.bz2
spack-221cf6acb932442f5964243eb3413a1d921920c8.tar.xz
spack-221cf6acb932442f5964243eb3413a1d921920c8.zip
Consolidate most module code into spack.modules and spack.cmd.module
- One file with all the module classes (spack/modules.py) - Has an EnvModule superclass that does most of the work and consolidates common code - Subclasses have specializations for different module systems (TclModule, Dotkit) - One command (spack module) for all the types of modules to use - the one command is used by the scripts, only need to maintain in one place - has some subcommands for different module types, but they're handled mostly generically. - Consolidate zsh support into a single setup-env.sh script.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/spack7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/spack b/bin/spack
index c63178b191..f2b5d1d583 100755
--- a/bin/spack
+++ b/bin/spack
@@ -75,6 +75,13 @@ for cmd in spack.cmd.commands:
module = spack.cmd.get_module(cmd)
subparser = subparsers.add_parser(cmd, help=module.description)
module.setup_parser(subparser)
+
+# Just print help and exit if run with no arguments at all
+if len(sys.argv) == 1:
+ parser.print_help()
+ sys.exit(1)
+
+# actually parse the args.
args = parser.parse_args()
# Set up environment based on args.