Skip to content

Commit

Permalink
fix nightly types (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
amtoine committed Jan 21, 2024
1 parent 6a80c06 commit 44995d5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions pkgs/nu-git-manager/nu-git-manager/git/url.nu
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export def parse-git-url []: string -> record<host: string, owner: string, group
}

{
owner: $owner,
group: $group,
owner: ($owner | default ""),
group: ($group | default ""),
repo: ($tokens | last)
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkgs/nu-git-manager/nu-git-manager/mod.nu
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export def "gm clone" [
}
}

let urls = get-fetch-push-urls $repository $fetch $push $ssh
let urls = get-fetch-push-urls $repository ($fetch | default "") ($push | default "") $ssh

mut args = [$urls.fetch $local_path --origin $remote]
if $depth != null {
Expand Down
18 changes: 9 additions & 9 deletions pkgs/nu-git-manager/tests/mod.nu
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ export def git-url-parsing [] {
let cases = [
[input, host, owner, group, repo];

["https://github.com/foo/bar", "github.com", "foo", null, "bar"],
["https://github.com/foo/bar.git", "github.com", "foo", null, "bar"],
["https://github.com/foo/bar/tree/branch/file", "github.com", "foo", null, "bar"],
["ssh://github.com/foo/bar", "github.com", "foo", null, "bar"],
["[email protected]:foo/bar", "github.com", "foo", null, "bar"],
["https://gitlab.com/foo/bar", "gitlab.com", "foo", null, "bar"],
["[email protected]:foo/bar", "gitlab.com", "foo", null, "bar"],
["https://github.com/foo/bar", "github.com", "foo", "", "bar"],
["https://github.com/foo/bar.git", "github.com", "foo", "", "bar"],
["https://github.com/foo/bar/tree/branch/file", "github.com", "foo", "", "bar"],
["ssh://github.com/foo/bar", "github.com", "foo", "", "bar"],
["[email protected]:foo/bar", "github.com", "foo", "", "bar"],
["https://gitlab.com/foo/bar", "gitlab.com", "foo", "", "bar"],
["[email protected]:foo/bar", "gitlab.com", "foo", "", "bar"],
["[email protected]:foo/bar/baz/brr", "gitlab.com", "foo", "bar/baz", "brr"],
["git://git.suckless.org/st", "git.suckless.org", null, null, "st"],
["git://git.suckless.org/st", "git.suckless.org", "", "", "st"],
]

for case in $cases {
Expand Down Expand Up @@ -204,7 +204,7 @@ export def cache-manipulation [] {
root_hash: "",
}

def "assert cache" [cache: list<string>]: nothing -> nothing {
def "assert cache" [cache: list<any>]: nothing -> nothing {
let actual = open-cache $CACHE | update path { path remove-prefix (pwd | path sanitize) }
let expected = $cache
| each {|it|
Expand Down

0 comments on commit 44995d5

Please sign in to comment.