diff --git a/pkgs/build-support/portable-service/default.nix b/pkgs/build-support/portable-service/default.nix index 48237af5370f..c0baecb7b767 100644 --- a/pkgs/build-support/portable-service/default.nix +++ b/pkgs/build-support/portable-service/default.nix @@ -87,9 +87,9 @@ let }; in -assert lib.assertMsg (lib.all ( - u: lib.hasPrefix pname u.name -) units) "Unit names must be prefixed with the service name"; +assert + lib.all (u: lib.hasPrefix pname u.name) units + || throw "Unit names must be prefixed with the service name"; stdenv.mkDerivation { pname = "${pname}-img";