From 73af77aeedc1783ac06ff2a60099dbb481270f19 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Thu, 22 Sep 2022 14:35:43 -0400 Subject: [PATCH] command: enhance error message on no build to run --- command/build.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/command/build.go b/command/build.go index 9cb7cce0a..815000b2c 100644 --- a/command/build.go +++ b/command/build.go @@ -192,8 +192,10 @@ func (c *BuildCommand) RunContext(buildCtx context.Context, cla *BuildArgs) int if len(builds) == 0 { return writeDiags(c.Ui, nil, hcl.Diagnostics{ &hcl.Diagnostic{ - Summary: "No builds to run", - Detail: "a build command cannot run without at least one build to process", + Summary: "No builds to run", + Detail: "A build command cannot run without at least one build to process. " + + "If the only or except flags have been specified at run time check that" + + " at least one build is selected for execution.", Severity: hcl.DiagError, }, })