From 2cce1fd76b6d5513f60cb776b3ea7d9874d849ba Mon Sep 17 00:00:00 2001 From: Jameel Al-Aziz Date: Thu, 2 Nov 2023 18:38:07 -0700 Subject: [PATCH 1/2] fix: Set TMPDIR to avoid disk space issues Set `TMPDIR` if not already set to workaround potential disk space issues while running builds in a nix shell. See NixOS/nix#395 for more info. fixes #197 --- install-nix.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install-nix.sh b/install-nix.sh index d0e094a..e9d63c4 100755 --- a/install-nix.sh +++ b/install-nix.sh @@ -91,5 +91,10 @@ if [[ -n "${INPUT_NIX_PATH:-}" ]]; then echo "NIX_PATH=${INPUT_NIX_PATH}" >> "$GITHUB_ENV" fi +# Set temporary directory (if not already set) +if [[ -z "${TMPDIR:-}" ]]; then + echo "TMPDIR=${RUNNER_TEMP}" >> "$GITHUB_ENV" +fi + # Close the log message group which was opened above echo "::endgroup::" From 81eb746179c512cd2af2b52874a906e8bff47eb0 Mon Sep 17 00:00:00 2001 From: Jameel Al-Aziz <247849+jalaziz@users.noreply.github.com> Date: Fri, 3 Nov 2023 12:58:15 -0700 Subject: [PATCH 2/2] Update install-nix.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Domen Kožar --- install-nix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-nix.sh b/install-nix.sh index e9d63c4..4462f3a 100755 --- a/install-nix.sh +++ b/install-nix.sh @@ -91,7 +91,7 @@ if [[ -n "${INPUT_NIX_PATH:-}" ]]; then echo "NIX_PATH=${INPUT_NIX_PATH}" >> "$GITHUB_ENV" fi -# Set temporary directory (if not already set) +# Set temporary directory (if not already set) to fix https://github.com/cachix/install-nix-action/issues/197 if [[ -z "${TMPDIR:-}" ]]; then echo "TMPDIR=${RUNNER_TEMP}" >> "$GITHUB_ENV" fi