From 2cce1fd76b6d5513f60cb776b3ea7d9874d849ba Mon Sep 17 00:00:00 2001 From: Jameel Al-Aziz Date: Thu, 2 Nov 2023 18:38:07 -0700 Subject: [PATCH] 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::"