From 9581281cb43d3df3bca7f024a094dde513211c05 Mon Sep 17 00:00:00 2001 From: Gregory Kurtzer Date: Mon, 13 Sep 2021 22:36:45 -0700 Subject: [PATCH] Fixed redundant usage errors --- cmd/wwctl/main.go | 2 +- internal/app/wwctl/root.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/wwctl/main.go b/cmd/wwctl/main.go index 8741421e..3359b3e3 100644 --- a/cmd/wwctl/main.go +++ b/cmd/wwctl/main.go @@ -12,7 +12,7 @@ func main() { err := root.Execute() if err != nil { - fmt.Fprintf(os.Stderr, "%s: %s\n", os.Args[0], err) + fmt.Fprintf(os.Stderr, "ERROR: %s\n", err) if wwctl.DebugFlag { fmt.Printf("\nSTACK TRACE: %+v\n", err) } diff --git a/internal/app/wwctl/root.go b/internal/app/wwctl/root.go index e0f61998..840fbb6e 100644 --- a/internal/app/wwctl/root.go +++ b/internal/app/wwctl/root.go @@ -23,6 +23,7 @@ var ( Long: "Control interface to the Cluster Warewulf Provisioning System.", PersistentPreRunE: rootPersistentPreRunE, SilenceUsage: true, + SilenceErrors: true, } verboseArg bool DebugFlag bool