refactor(nix/tag): use throw over lib.assertMsg

Slightly prettier error message etc.

Change-Id: I9af4ec6ce337c65b5ca0820dc15a4e084832c529
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3542
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
sterni 2021-09-14 13:00:01 +02:00
parent bab46ed75e
commit bef44b2042

View file

@ -39,7 +39,7 @@ let
# like `verifyTag`, but throws the error message if it is not a tag.
assertIsTag = tag:
let res = verifyTag tag; in
assert lib.assertMsg res.isTag res.errmsg;
assert res.isTag || throw res.errmsg;
{ inherit (res) name val; };