Skip to content

Commit

Permalink
swap generate arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
amtoine committed Jul 26, 2024
1 parent 6cdfe07 commit dc0c806
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkgs/nu-git-manager-sugar/nu-git-manager-sugar/github.nu
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export def "gm gh query-api" [
if $no_paginate {
http get ($base_url | update params.page 1 | url join)
} else {
let res = generate 1 {|page|
let res = generate { |page|
log debug $"pulling page ($page)"
let resp = http get ($base_url | update params.page $page | url join)

Expand Down Expand Up @@ -173,7 +173,7 @@ export def "gm gh query-api" [
error make --unspanned { msg: $err_msg }
}
}
}
} 1

$res | flatten
}
Expand Down
4 changes: 2 additions & 2 deletions pkgs/nu-git-manager/nu-git-manager/fs/dir.nu
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use path.nu ["path sanitize"]
#
# /!\ this command will return sanitized paths /!\
export def clean-empty-directories-rec []: list<path> -> list<path> {
let deleted = generate $in {|directories|
let deleted = generate {|directories|
let next = $directories | each {|it|
rm --force $it

Expand All @@ -19,7 +19,7 @@ export def clean-empty-directories-rec []: list<path> -> list<path> {
} else {
{out: $directories, next: $next}
}
}
} $in

$deleted | flatten
}

0 comments on commit dc0c806

Please sign in to comment.