Skip to content

Commit 685bbb2

Browse files
committed
Don't use sudo when uploading extraFiles
There seems to be no scenario where we aren't root on the target system at this point. But there is one where it breaks: If hasSudo is true because the pre-kexec env had it, but kexec env does not. See #431
1 parent 9ba099b commit 685bbb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nixos-anywhere.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ nixosInstall() {
577577

578578
if [[ -n ${extraFiles} ]]; then
579579
step Copying extra files
580-
tar -C "$extraFiles" -cpf- . | runSsh "${maybeSudo} tar -C /mnt -xf- --no-same-owner"
580+
tar -C "$extraFiles" -cpf- . | runSsh "tar -C /mnt -xf- --no-same-owner"
581581
runSsh "chmod 755 /mnt" # tar also changes permissions of /mnt
582582
fi
583583

0 commit comments

Comments
 (0)