diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2024-03-25 12:20:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-25 12:20:58 +0100 |
commit | ecbeabd18200e3de7440f9bf48feb0f9577269ce (patch) | |
tree | 90dcbfef21c3bbc2ed47b48f4c70471508b0d0ba | |
parent | 5f583a11a14069e85cf4650bff99d7b82c6579e9 (diff) | |
parent | 24ae98307652ded76946984d72f57fbe776bfeca (diff) |
Merge pull request #293846 from amarshall/darwin-linux-builder-fail-on-error
darwin.linux-builder: Exit scripts on error
-rw-r--r-- | nixos/modules/profiles/macos-builder.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/modules/profiles/macos-builder.nix b/nixos/modules/profiles/macos-builder.nix index 6c2602881d6b5..786e26cf98f7f 100644 --- a/nixos/modules/profiles/macos-builder.nix +++ b/nixos/modules/profiles/macos-builder.nix @@ -145,6 +145,8 @@ in # This installCredentials script is written so that it's as easy as # possible for a user to audit before confirming the `sudo` installCredentials = hostPkgs.writeShellScript "install-credentials" '' + set -euo pipefail + KEYS="''${1}" INSTALL=${hostPkgs.coreutils}/bin/install "''${INSTALL}" -g nixbld -m 600 "''${KEYS}/${user}_${keyType}" ${privateKey} @@ -154,6 +156,9 @@ in hostPkgs = config.virtualisation.host.pkgs; script = hostPkgs.writeShellScriptBin "create-builder" ( + '' + set -euo pipefail + '' + # When running as non-interactively as part of a DarwinConfiguration the working directory # must be set to a writeable directory. (if cfg.workingDirectory != "." then '' |