summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/cmd/install.py4
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):