spack compiler info exit 1 when no compilers are found (#28493)

fixes #28492
This commit is contained in:
Logan Harbour 2022-01-19 03:50:15 -07:00 committed by GitHub
parent 93ebc4f47b
commit 9723d918bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,7 +120,7 @@ def compiler_info(args):
compilers = spack.compilers.compilers_for_spec(cspec, scope=args.scope)
if not compilers:
tty.error("No compilers match spec %s" % cspec)
tty.die("No compilers match spec %s" % cspec)
else:
for c in compilers:
print(str(c.spec) + ":")