mirror of
https://github.com/cachix/install-nix-action.git
synced 2024-12-22 06:53:27 +00:00
take 3
This commit is contained in:
parent
712fbc2bf9
commit
8ba86cf165
1 changed files with 5 additions and 2 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue