mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-12 05:16:25 +03:00
update-python-libraries: don't error out on nix-prefetch-url errors
$ nix-prefetch-url --type sha256 --unpack https://api.github.com/repos/pkgw/pwkit/tarball/pwkit@1.2.0 error: store path 'rb2j54laxa71152bsqayw4h5hni2nshj-pwkit@1.2.0' contains illegal character '@'
This commit is contained in:
parent
f4b46cf524
commit
06922865e8
1 changed files with 10 additions and 7 deletions
|
@ -319,6 +319,7 @@ def _get_latest_version_github(attr_path, package, extension, current_version, t
|
||||||
tag_url = str(release["tarball_url"]).replace(
|
tag_url = str(release["tarball_url"]).replace(
|
||||||
"tarball", "tarball/refs/tags"
|
"tarball", "tarball/refs/tags"
|
||||||
)
|
)
|
||||||
|
try:
|
||||||
hash = (
|
hash = (
|
||||||
subprocess.check_output(
|
subprocess.check_output(
|
||||||
["nix-prefetch-url", "--type", "sha256", "--unpack", tag_url],
|
["nix-prefetch-url", "--type", "sha256", "--unpack", tag_url],
|
||||||
|
@ -327,6 +328,8 @@ def _get_latest_version_github(attr_path, package, extension, current_version, t
|
||||||
.decode("utf-8")
|
.decode("utf-8")
|
||||||
.strip()
|
.strip()
|
||||||
)
|
)
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
raise ValueError("nix-prefetch-url failed")
|
||||||
|
|
||||||
return version, hash, prefix
|
return version, hash, prefix
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue