spack env: activate note (#16279)

print a note on how to activate a newly created environment
This commit is contained in:
Axel Huebl 2020-04-24 13:24:52 -07:00 committed by GitHub
parent 051d0d935a
commit 5828a8f7e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -208,10 +208,14 @@ def _env_create(name_or_path, init_file=None, dir=False, with_view=None):
env = ev.Environment(name_or_path, init_file, with_view)
env.write()
tty.msg("Created environment in %s" % env.path)
tty.msg("You can activate this environment with:")
tty.msg(" spack env activate %s" % env.path)
else:
env = ev.create(name_or_path, init_file, with_view)
env.write()
tty.msg("Created environment '%s' in %s" % (name_or_path, env.path))
tty.msg("You can activate this environment with:")
tty.msg(" spack env activate %s" % (name_or_path))
return env