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 ]