pantheon.updateScript: add a throw

This commit is contained in:
worldofpeace 2019-08-05 18:19:01 -04:00
parent 0b59f4212c
commit 47a9e8783a

View file

@ -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 ]