Skip to content

Commit 5f021d6

Browse files
authored
Merge pull request #501 from nix-community/build-on-detection
fix buildOn=auto detection
2 parents 6490e56 + fe919da commit 5f021d6

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

docs/cli.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ Options:
1414
* -p, --ssh-port <ssh_port>
1515
set the ssh port to connect with
1616
* --ssh-option <ssh_option>
17-
set an ssh option
17+
set one ssh option, no need for the '-o' flag, can be repeated.
18+
for example: '--ssh-option UserKnownHostsFile=./known_hosts'
1819
* -L, --print-build-logs
1920
print full build logs
2021
* --env-password

docs/reference.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ Options:
3535
* -p, --ssh-port <ssh_port>
3636
set the ssh port to connect with
3737
* --ssh-option <ssh_option>
38-
set an ssh option
38+
set one ssh option, no need for the '-o' flag, can be repeated.
39+
for example: '--ssh-option UserKnownHostsFile=./known_hosts'
3940
* -L, --print-build-logs
4041
print full build logs
4142
* --env-password

src/nixos-anywhere.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ Options:
8585
* -p, --ssh-port <ssh_port>
8686
set the ssh port to connect with
8787
* --ssh-option <ssh_option>
88-
set an ssh option
88+
set one ssh option, no need for the '-o' flag, can be repeated.
89+
for example: '--ssh-option UserKnownHostsFile=./known_hosts'
8990
* -L, --print-build-logs
9091
print full build logs
9192
* --env-password
@@ -545,13 +546,15 @@ checkBuildLocally() {
545546
546547
local entropy
547548
entropy="$(date +'%Y%m%d%H%M%S')"
549+
548550
if nix build \
549551
-L \
550552
"${nixOptions[@]}" \
551553
--expr \
552554
"derivation { system = \"$system\"; name = \"env-$entropy\"; builder = \"/bin/sh\"; args = [ \"-c\" \"echo > \$out\" ]; }"; then
553555
# The local build failed
554556
buildOn=local
557+
return
555558
fi
556559
557560
buildOn=remote

0 commit comments

Comments
 (0)