diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2023-04-06 18:09:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-06 09:09:18 -0700 |
commit | 0b9694575f1aef64eda5b114f23d9d521cbc49dc (patch) | |
tree | cdcb748dbf7a4adf236670827a30221cd2720936 /lib | |
parent | 6e490f2239f4376d50097f3f90879992c83c13e0 (diff) | |
download | spack-0b9694575f1aef64eda5b114f23d9d521cbc49dc.tar.gz spack-0b9694575f1aef64eda5b114f23d9d521cbc49dc.tar.bz2 spack-0b9694575f1aef64eda5b114f23d9d521cbc49dc.tar.xz spack-0b9694575f1aef64eda5b114f23d9d521cbc49dc.zip |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/install.py | 4 |
1 files changed, 4 insertions, 0 deletions
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): |