From 0b9694575f1aef64eda5b114f23d9d521cbc49dc Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 6 Apr 2023 18:09:18 +0200 Subject: 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. --- lib/spack/spack/cmd/install.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py index b84b73775e..8fe952943b 100644 --- a/lib/spack/spack/cmd/install.py +++ b/lib/spack/spack/cmd/install.py @@ -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): -- cgit v1.2.3-60-g2f50