Compare commits

...

4 Commits

Author SHA1 Message Date
Domen Kožar
39d848c6d3 comments 2021-10-15 17:19:42 -05:00
Domen Kožar
8ba86cf165 take 3 2021-10-15 17:17:52 -05:00
Domen Kožar
712fbc2bf9 take 2 2021-10-15 16:45:20 -05:00
Domen Kožar
c5729e9110 If Nix profile environment exist, source it before installation check 2021-10-14 13:21:13 -05:00

View File

@ -1,6 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail
# Set paths early (ephemeral self-hosted runners might reuse a runner)
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)"
exit
@ -59,6 +62,7 @@ fi
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"
fi