Exit with status code 1 if cosign is not configured

This commit is contained in:
Atanas Dinov
2024-02-23 10:39:47 +02:00
parent 1b9d057f7a
commit 003560c3b3

View File

@@ -2,8 +2,8 @@ package main
import (
"context"
"os"
"embed"
"os"
"github.com/rancherfederal/hauler/cmd/hauler/cli"
"github.com/rancherfederal/hauler/pkg/cosign"
@@ -23,8 +23,9 @@ func main() {
// ensure cosign binary is available
if err := cosign.EnsureBinaryExists(ctx, binaries); err != nil {
logger.Errorf("%v", err)
os.Exit(1)
}
if err := cli.New().ExecuteContext(ctx); err != nil {
logger.Errorf("%v", err)
cancel()