From bef44b20424f8f0adf459039baa5c552fa51830e Mon Sep 17 00:00:00 2001 From: sterni Date: Tue, 14 Sep 2021 13:00:01 +0200 Subject: 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 --- nix/tag/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nix') 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; }; -- cgit 1.4.1