From 774f74b8757d6c9809825d3c14fbe313db1378cf Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Tue, 6 Oct 2015 20:31:26 +0200 Subject: [PATCH] Don't fail if env-vars cannot be written to env-vars is a debugging aid, see https://github.com/NixOS/nix/commit/3e5dbb24337d8416cfe46484eb2692811546a9c1 for a rationale for this change. --- pkgs/build-support/builder-defs/builder-defs.nix | 2 +- pkgs/stdenv/generic/setup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/builder-defs/builder-defs.nix b/pkgs/build-support/builder-defs/builder-defs.nix index 551ed9ea57e8..e21b032aacbe 100644 --- a/pkgs/build-support/builder-defs/builder-defs.nix +++ b/pkgs/build-support/builder-defs/builder-defs.nix @@ -336,7 +336,7 @@ let inherit (builtins) head tail trace; in doDump = n: noDepEntry "echo Dump number ${n}; set"; - saveEnv = noDepEntry ''export > $TMP/env-vars''; + saveEnv = noDepEntry ''export > "$TMP/env-vars" || true''; doDumpBuildInputs = noDepEntry ('' echo "${toString realBuildInputs}" diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 57875fa6ada2..a01af7db70a3 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -450,7 +450,7 @@ substituteAllInPlace() { # the environment used for building. dumpVars() { if [ "$noDumpEnvVars" != 1 ]; then - export > "$NIX_BUILD_TOP/env-vars" + export > "$NIX_BUILD_TOP/env-vars" || true fi }