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:
parent
e28e6d2618
commit
d5d1d9548f
@ -40,6 +40,8 @@ def stage(parser, args):
|
|||||||
for spec in env.specs_by_hash.values():
|
for spec in env.specs_by_hash.values():
|
||||||
for dep in spec.traverse():
|
for dep in spec.traverse():
|
||||||
dep.package.do_stage()
|
dep.package.do_stage()
|
||||||
|
tty.msg("Staged {0} in {1}".format(dep.package.name,
|
||||||
|
dep.package.stage.path))
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
tty.die("`spack stage` requires a spec or an active environment")
|
tty.die("`spack stage` requires a spec or an active environment")
|
||||||
@ -62,3 +64,4 @@ def stage(parser, args):
|
|||||||
if custom_path:
|
if custom_path:
|
||||||
package.path = custom_path
|
package.path = custom_path
|
||||||
package.do_stage()
|
package.do_stage()
|
||||||
|
tty.msg("Staged {0} in {1}".format(package.name, package.stage.path))
|
||||||
|
Loading…
Reference in New Issue
Block a user