Skip to content

Commit

Permalink
Don't use sudo when uploading extraFiles
Browse files Browse the repository at this point in the history
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
  • Loading branch information
phaer committed Dec 10, 2024
1 parent 9ba099b commit 685bbb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nixos-anywhere.sh
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ nixosInstall() {

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

Expand Down

0 comments on commit 685bbb2

Please sign in to comment.