cmd/stage: print stage path (#24019)

This is a small quality of life improvement so that users can easily
copy and paste the stage path after executing `spack stage spec`.
This commit is contained in:
Michael Kuhn 2021-06-04 13:18:55 +02:00 committed by GitHub
parent e28e6d2618
commit d5d1d9548f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,6 +40,8 @@ def stage(parser, args):
for spec in env.specs_by_hash.values():
for dep in spec.traverse():
dep.package.do_stage()
tty.msg("Staged {0} in {1}".format(dep.package.name,
dep.package.stage.path))
return
else:
tty.die("`spack stage` requires a spec or an active environment")
@ -62,3 +64,4 @@ def stage(parser, args):
if custom_path:
package.path = custom_path
package.do_stage()
tty.msg("Staged {0} in {1}".format(package.name, package.stage.path))