Compare commits
2 Commits
dd84c45c71
...
4b65d05dcc
Author | SHA1 | Date |
---|---|---|
jolheiser | 4b65d05dcc | |
jolheiser | 3bccb54f54 |
14
main.go
14
main.go
|
@ -56,10 +56,18 @@ func main() {
|
|||
}
|
||||
uri := fs.Arg(0)
|
||||
|
||||
if *updateFlag && strings.Index(uri, "/") == -1 {
|
||||
if pkg, ok := m.Packages[uri]; ok {
|
||||
uri = pkg.Repo
|
||||
if strings.Index(uri, "/") == -1 {
|
||||
if !*updateFlag {
|
||||
fmt.Printf("%q was not a URI and --update was not passed\n", uri)
|
||||
return
|
||||
}
|
||||
|
||||
pkg, ok := m.Packages[uri]
|
||||
if !ok {
|
||||
fmt.Printf("%q was not a URI and didn't match an installed package\n", uri)
|
||||
return
|
||||
}
|
||||
uri = pkg.Repo
|
||||
}
|
||||
|
||||
f, err = forge.NewGitea(uri)
|
||||
|
|
Reference in New Issue