fix: correct if-logic for update
Signed-off-by: jolheiser <john.olheiser@gmail.com>main v0.0.4
parent
3bccb54f54
commit
4b65d05dcc
6
main.go
6
main.go
|
@ -56,15 +56,15 @@ func main() {
|
|||
}
|
||||
uri := fs.Arg(0)
|
||||
|
||||
if strings.Index(uri, "/") != -1 {
|
||||
if strings.Index(uri, "/") == -1 {
|
||||
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
|
||||
}
|
||||
|
||||
pkg, ok := m.Packages[uri]
|
||||
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
|
||||
}
|
||||
uri = pkg.Repo
|
||||
|
|
Reference in New Issue