Skip to content

Commit

Permalink
update fetcher for nu 0.72
Browse files Browse the repository at this point in the history
  • Loading branch information
WindSoilder committed Dec 5, 2022
1 parent c1c5196 commit 45b422e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fetcher.nu
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ def get-lib-path [name: string] {
export def fetch-lib [
name: string # lib name
] {
if (not (all-libs | any? ($it == $name))) {
if (not (all-libs | any ($it == $name))) {
error make -u {msg: $"Library `($name)` is not supported, run `all-libs` to check for all available libs"}
}
echo $"going to download lib ($name)"
let url = $"https://formats.kaitai.io/($name)/src/python/($name).py"
let content = fetch $url
let target_path = get-lib-path $name
echo $"download complete, begin to save"
$content | save $target_path
$content | save -f $target_path
echo "done"
}

Expand Down

0 comments on commit 45b422e

Please sign in to comment.