fix: correct if-logic for update
ci/woodpecker/push/goreleaser Pipeline was successful Details
ci/woodpecker/tag/goreleaser Pipeline was successful Details

Signed-off-by: jolheiser <john.olheiser@gmail.com>
main v0.0.4
jolheiser 2023-01-30 22:07:36 -06:00
parent 3bccb54f54
commit 4b65d05dcc
Signed by: jolheiser
GPG Key ID: B853ADA5DA7BBF7A
1 changed files with 3 additions and 3 deletions

View File

@ -56,15 +56,15 @@ func main() {
} }
uri := fs.Arg(0) uri := fs.Arg(0)
if strings.Index(uri, "/") != -1 { if strings.Index(uri, "/") == -1 {
if !*updateFlag { if !*updateFlag {
fmt.Println("provided arg must be a URI, unless using --update") fmt.Printf("%q was not a URI and --update was not passed\n", uri)
return return
} }
pkg, ok := m.Packages[uri] pkg, ok := m.Packages[uri]
if !ok { if !ok {
fmt.Println("arg was not a URI and didn't match an installed package") fmt.Printf("%q was not a URI and didn't match an installed package\n", uri)
return return
} }
uri = pkg.Repo uri = pkg.Repo