Skip to content

Commit db6bb6b

Browse files
committed
fix
1 parent e36fbb5 commit db6bb6b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Github/Runners/ubuntu-builder.dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,14 @@ RUN <<EOS
165165
#----------------------#
166166
#Nix
167167
hash -r &>/dev/null
168-
if ! command -v nix >/dev/null 2>&1; then
169-
cd "$(mktemp -d)" >/dev/null 2>&1
170-
curl -qfsSL "https://raw.githubusercontent.com/pkgforge/devscripts/refs/heads/main/Linux/install_nix.sh" -o "./install_nix.sh"
171-
dos2unix --quiet "./install_nix.sh" ; chmod +x "./install_nix.sh"
172-
bash "./install_nix.sh" 2>/dev/null || true ; rm -rf "./install_nix.sh"
173-
fi
168+
sudo -u "runner" bash -c \
169+
'
170+
pushd "$(mktemp -d)" &>/dev/null
171+
curl -qfsSL "https://raw.githubusercontent.com/pkgforge/devscripts/refs/heads/main/Linux/install_nix.sh" -o "./install_nix.sh"
172+
dos2unix --quiet "./install_nix.sh" ; chmod +x "./install_nix.sh"
173+
bash "./install_nix.sh" || true
174+
rm -rf "$(realpath .)" ; popd &>/dev/null
175+
' || true
174176
#----------------------#
175177
#patchelf
176178
curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)/patchelf" -o "/usr/bin/patchelf" && chmod +x "/usr/bin/patchelf"

0 commit comments

Comments
 (0)