Skip to content

Commit

Permalink
factorio: use throw instead of abort
Browse files Browse the repository at this point in the history
Otherwise if you try to listing all available packages, you will get a
hard error on platforms not supported by this package.  Consequently the
tarball job was broken.
  • Loading branch information
vcunat committed Sep 7, 2017
1 parent 2ae7e95 commit f9ea527
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/games/factorio/default.nix
Expand Up @@ -26,15 +26,15 @@ let
demo = bdist { };
};
};
actual = binDists.${stdenv.system}.${releaseType};
actual = binDists.${stdenv.system}.${releaseType} or throw "Factorio: unsupported platform";

bdistForArch = arch: { sha256 ? null
, version ? "0.15.34"
, fetcher ? fetchurl
, nameMut ? x: x
}:
if sha256 == null then
abort "Factorio ${releaseType}-${arch.inTar} binaries are not (and were never?) available to download"
throw "Factorio ${releaseType}-${arch.inTar} binaries are not (and were never?) available to download"
else {
inherit version arch;
src = fetcher {
Expand Down

1 comment on commit f9ea527

@joachifm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See also #29044

Please sign in to comment.