From 47a9e8783ac34709d31a0f6799d0fac5f3d4268a Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Mon, 5 Aug 2019 18:19:01 -0400 Subject: [PATCH] pantheon.updateScript: add a throw --- pkgs/desktops/pantheon/update.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/desktops/pantheon/update.nix b/pkgs/desktops/pantheon/update.nix index 50f1fbd48460..7e9aacc0c2b2 100644 --- a/pkgs/desktops/pantheon/update.nix +++ b/pkgs/desktops/pantheon/update.nix @@ -29,6 +29,8 @@ let chmod +x $out ''; - versionFlag = { "release" = "-r"; "master" = "-m"; }.${versionPolicy}; + throwFlag = throw "${versionPolicy} is not a valid versionPolicy - Options are either 'release' or 'master' (defaults to release)."; + + versionFlag = { "release" = "-r"; "master" = "-m"; }.${versionPolicy} or throwFlag; in [ updateScript versionFlag repoName attrPath ]