Fix gitfixremote
This commit is contained in:
@ -2,7 +2,8 @@ def gitfixremote [
|
||||
--name: string = "origin",
|
||||
] {
|
||||
let url = (git remote get-url $name)
|
||||
let parsed = ($url | parse --regex '(https://)?(?P<host>[^/]+)(/|:)(?P<owner>[^/]+)/(?P<repo>[^/\.]+)')
|
||||
let parsed = ($url | parse --regex '(https://)?(\w*@)?(?P<host>[^/]+)(/|:)(?P<owner>[^/]+)/(?P<repo>[^/\.]+)')
|
||||
|
||||
if ($parsed | is-empty) {
|
||||
print "Unparseable remote"
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user