Skip to content

Commit

Permalink
fix: exit with non zero returncode on error
Browse files Browse the repository at this point in the history
  • Loading branch information
axtloss committed Nov 9, 2024
1 parent dc4165d commit 929bc8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var rootCmd = &cobra.Command{
Use: "vib",
Short: "Vib is a tool to build container images from recipes using modules",
Long: "Vib is a tool to build container images from YAML recipes using modules to define the steps to build the image.",
SilenceUsage: true,
Version: Version,
}

Expand Down
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"os"
"github.com/vanilla-os/vib/cmd"
)

Expand All @@ -9,5 +10,8 @@ var (
)

func main() {
cmd.Execute()
err := cmd.Execute()
if (err != nil) {
os.Exit(1)
}
}

0 comments on commit 929bc8a

Please sign in to comment.