Fly command: warns if no stalled workers are present.
Executing `fly prune-worker --all-stalled` should not
return an error if no stalled workers are present to
be more friendly toward automated systems.
Prints instead a warning and exits gracefully.
@@ -5,6 +5,7 @@ import (
"github.com/concourse/concourse/fly/commands/internal/displayhelpers"
"github.com/concourse/concourse/fly/rc"
+ "github.com/concourse/concourse/fly/ui"
)
type PruneWorkerCommand struct {
@@ -44,7 +45,7 @@ func (command *PruneWorkerCommand) Execute(args []string) error {
}
}
if workersNames == nil {
- displayhelpers.Failf("No stalled worker found.")
+ fmt.Printf(ui.WarningColor("WARNING: No stalled workers found.\n"))
}
}
