From 123778dec253d7a1e6bd03e26708a92320ce612a Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 1 Jun 2015 09:56:35 -0700 Subject: [PATCH] Add -S/--stages option to spack cd/spack location. - can now change dir to top-level stage --- lib/spack/spack/cmd/location.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/spack/spack/cmd/location.py b/lib/spack/spack/cmd/location.py index 709e894b7f..e8e9c3f277 100644 --- a/lib/spack/spack/cmd/location.py +++ b/lib/spack/spack/cmd/location.py @@ -54,6 +54,8 @@ def setup_parser(subparser): help="Top-level packages directory for Spack.") directories.add_argument( '-s', '--stage-dir', action='store_true', help="Stage directory for a spec.") + directories.add_argument( + '-S', '--stages', action='store_true', help="Top level Stage directory.") directories.add_argument( '-b', '--build-dir', action='store_true', help="Checked out or expanded source directory for a spec (requires it to be staged first).") @@ -72,6 +74,9 @@ def location(parser, args): elif args.packages: print spack.db.root + elif args.stages: + print spack.stage_path + else: specs = spack.cmd.parse_specs(args.spec) if not specs: