From e556fb266333be1938afd8673df2c6cd2fb7a3aa Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Tue, 2 Jan 2024 17:32:24 +0100 Subject: Don't use die() for printing usage --- cmd/git-lfs-authenticate/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/git-lfs-authenticate/main.go b/cmd/git-lfs-authenticate/main.go index 5a5b760..a76fdff 100644 --- a/cmd/git-lfs-authenticate/main.go +++ b/cmd/git-lfs-authenticate/main.go @@ -120,13 +120,15 @@ func main() { logger := newLogger(reqID) if len(os.Args) != 3 { - die(usage) + fmt.Println(usage) + os.Exit(1) } repo := strings.TrimPrefix(strings.TrimSuffix(os.Args[1], ".git"), "/") operation := os.Args[2] if operation != "download" && operation != "upload" { - die(usage) + fmt.Println(usage) + os.Exit(1) } repoHRefBaseStr := os.Getenv("REPO_HREF_BASE") -- cgit v1.2.3