mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-18 07:29:23 +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,14 +319,17 @@ def _get_latest_version_github(attr_path, package, extension, current_version, t
|
|||
tag_url = str(release["tarball_url"]).replace(
|
||||
"tarball", "tarball/refs/tags"
|
||||
)
|
||||
hash = (
|
||||
subprocess.check_output(
|
||||
["nix-prefetch-url", "--type", "sha256", "--unpack", tag_url],
|
||||
stderr=subprocess.DEVNULL,
|
||||
try:
|
||||
hash = (
|
||||
subprocess.check_output(
|
||||
["nix-prefetch-url", "--type", "sha256", "--unpack", tag_url],
|
||||
stderr=subprocess.DEVNULL,
|
||||
)
|
||||
.decode("utf-8")
|
||||
.strip()
|
||||
)
|
||||
.decode("utf-8")
|
||||
.strip()
|
||||
)
|
||||
except subprocess.CalledProcessError:
|
||||
raise ValueError("nix-prefetch-url failed")
|
||||
|
||||
return version, hash, prefix
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue