Skip to content

Commit daf5a2a

Browse files
committed
nixos-anywhere: fix --build-on auto always defaulting to local
1 parent b957b44 commit daf5a2a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/nixos-anywhere.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -552,13 +552,12 @@ checkBuildLocally() {
552552
-L \
553553
"${nixOptions[@]}" \
554554
--expr \
555-
"derivation { system = \"$system\"; name = \"env-$entropy\"; builder = \"/bin/sh\"; args = [ \"-c\" \"echo > \$out\" ]; }"; then
555+
"derivation { system = \"$machineSystem\"; name = \"env-$entropy\"; builder = \"/bin/sh\"; args = [ \"-c\" \"echo > \$out\" ]; }"; then
556556
# The local build failed
557557
buildOn=local
558-
return
558+
else
559+
buildOn=remote
559560
fi
560-
561-
buildOn=remote
562561
}
563562
564563
generateHardwareConfig() {

0 commit comments

Comments
 (0)