about summary refs log tree commit diff
path: root/nix/tag/default.nix
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2021-09-14T11·00+0200
committersterni <sternenseemann@systemli.org>2021-10-24T20·25+0000
commitbef44b20424f8f0adf459039baa5c552fa51830e (patch)
tree61cac4600eeed7f841c853eb33262e4eff5fc3cc /nix/tag/default.nix
parentbab46ed75e85baf945fbefaadeebfef975e282ca (diff)
refactor(nix/tag): use throw over lib.assertMsg r/2991
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>
Diffstat (limited to 'nix/tag/default.nix')
-rw-r--r--nix/tag/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nix/tag/default.nix b/nix/tag/default.nix
index 23f369c2b2d1..9c55e6263b39 100644
--- a/nix/tag/default.nix
+++ b/nix/tag/default.nix
@@ -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; };