diff options
author | Rutger Broekhoff | 2024-01-02 17:32:24 +0100 |
---|---|---|
committer | Rutger Broekhoff | 2024-01-02 17:32:24 +0100 |
commit | e556fb266333be1938afd8673df2c6cd2fb7a3aa (patch) | |
tree | af399b418efff8f88b1f52ca69b5fe0a4c86600c | |
parent | 3d315c0de053fa131724fa754cdfe004f95c62ce (diff) | |
download | gitolfs3-e556fb266333be1938afd8673df2c6cd2fb7a3aa.tar.gz gitolfs3-e556fb266333be1938afd8673df2c6cd2fb7a3aa.zip |
Don't use die() for printing usage
-rw-r--r-- | cmd/git-lfs-authenticate/main.go | 6 |
1 files 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() { | |||
120 | logger := newLogger(reqID) | 120 | logger := newLogger(reqID) |
121 | 121 | ||
122 | if len(os.Args) != 3 { | 122 | if len(os.Args) != 3 { |
123 | die(usage) | 123 | fmt.Println(usage) |
124 | os.Exit(1) | ||
124 | } | 125 | } |
125 | 126 | ||
126 | repo := strings.TrimPrefix(strings.TrimSuffix(os.Args[1], ".git"), "/") | 127 | repo := strings.TrimPrefix(strings.TrimSuffix(os.Args[1], ".git"), "/") |
127 | operation := os.Args[2] | 128 | operation := os.Args[2] |
128 | if operation != "download" && operation != "upload" { | 129 | if operation != "download" && operation != "upload" { |
129 | die(usage) | 130 | fmt.Println(usage) |
131 | os.Exit(1) | ||
130 | } | 132 | } |
131 | 133 | ||
132 | repoHRefBaseStr := os.Getenv("REPO_HREF_BASE") | 134 | repoHRefBaseStr := os.Getenv("REPO_HREF_BASE") |