Skip to content

Commit

Permalink
Merge pull request #139 from figsoda/empty
Browse files Browse the repository at this point in the history
reject empty hashes
  • Loading branch information
figsoda authored Feb 13, 2023
2 parents b00b6a5 + 3e2b3c8 commit 93164ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nix_update/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ def nix_prefetch(opts: Options, attr: str) -> str:
finally:
if tempdir:
tempdir.cleanup()
return got

if got == "":
raise UpdateError(f"empty hash when trying to update {opts.attribute}.{attr}")
else:
return got


def disable_check_meta(opts: Options) -> str:
Expand Down

0 comments on commit 93164ba

Please sign in to comment.