spack install: fail if --log-file and not --log-format (#36684)

fixes #34551

"spack install" now fails if a user passed the --logfile option without specifying a log format.
This commit is contained in:
Massimiliano Culpo 2023-04-06 18:09:18 +02:00 committed by GitHub
parent 6e490f2239
commit 0b9694575f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -340,6 +340,10 @@ def install(parser, args):
if args.deprecated:
spack.config.set("config:deprecated", True, scope="command_line")
if args.log_file and not args.log_format:
msg = "the '--log-format' must be specified when using '--log-file'"
tty.die(msg)
arguments.sanitize_reporter_options(args)
def reporter_factory(specs):