From ee5b099e024605a1b20ee3d8b5fa01147351e09c Mon Sep 17 00:00:00 2001 From: Gregory Kurtzer Date: Wed, 8 Sep 2021 11:38:39 -0700 Subject: [PATCH] Exit with error properly and fix lint check --- cmd/wwctl/main.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/wwctl/main.go b/cmd/wwctl/main.go index 73fea222..5a265d47 100644 --- a/cmd/wwctl/main.go +++ b/cmd/wwctl/main.go @@ -1,12 +1,16 @@ package main import ( + "os" + "github.com/hpcng/warewulf/internal/app/wwctl" ) func main() { root := wwctl.GetRootCommand() - //nolint:errcheck - root.Execute() + err := root.Execute() + if err != nil { + os.Exit(255) + } }