Skip to content

Commit e4af92b

Browse files
authored
Merge pull request #386 from chreekat/b/fix-substitute-on-destination
Re-invert behavior of --no-substitute-on-destination
2 parents 9db169c + 95efb19 commit e4af92b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/nixos-anywhere.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ step() {
123123
}
124124

125125
parseArgs() {
126+
local substituteOnDestination=y
127+
local printBuildLogs=n
126128
while [[ $# -gt 0 ]]; do
127129
case "$1" in
128130
-f | --flake)
@@ -226,7 +228,7 @@ parseArgs() {
226228
nixOptions+=("--option" "$key" "$value")
227229
;;
228230
--no-substitute-on-destination)
229-
nixCopyOptions+=("--substitute-on-destination")
231+
substituteOnDestination=n
230232
;;
231233
--build-on-remote)
232234
buildOnRemote=y
@@ -249,10 +251,14 @@ parseArgs() {
249251
shift
250252
done
251253

252-
if [[ ${printBuildLogs-n} == "y" ]]; then
254+
if [[ ${printBuildLogs} == "y" ]]; then
253255
nixOptions+=("-L")
254256
fi
255257

258+
if [[ $substituteOnDestination == "y" ]]; then
259+
nixCopyOptions+=("--substitute-on-destination")
260+
fi
261+
256262
if [[ $vmTest == "n" ]] && [[ -z ${sshConnection} ]]; then
257263
abort "ssh-host must be set"
258264
fi

0 commit comments

Comments
 (0)