From 8ba86cf16517a669d4bd50f42e0e74939402705d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Fri, 15 Oct 2021 17:17:52 -0500 Subject: [PATCH] take 3 --- lib/install-nix.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/install-nix.sh b/lib/install-nix.sh index 43b0130..1fb3c4f 100755 --- a/lib/install-nix.sh +++ b/lib/install-nix.sh @@ -2,8 +2,7 @@ set -euo pipefail # Set paths early (ephemeral self-hosted runners might reuse a runner) -echo "/nix/var/nix/profiles/per-user/$USER/profile/bin" >> "$GITHUB_PATH" -echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH" +PATH="/nix/var/nix/profiles/per-user/$USER/profile/bin":"/nix/var/nix/profiles/default/bin":$PATH if type -p nix &>/dev/null ; then echo "Aborting: Nix is already installed at $(type -p nix)" @@ -59,6 +58,10 @@ if [[ $OSTYPE =~ darwin ]]; then sudo launchctl setenv NIX_SSL_CERT_FILE "$cert_file" fi +# Set paths early (ephemeral self-hosted runners might reuse a runner) +echo "/nix/var/nix/profiles/per-user/$USER/profile/bin" >> "$GITHUB_PATH" +echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH" + if [[ $INPUT_NIX_PATH != "" ]]; then echo "NIX_PATH=${INPUT_NIX_PATH}" >> "$GITHUB_ENV"