Skip to content

Commit c928f74

Browse files
chreekatMic92
authored andcommitted
Re-invert behavior of --no-substitute-on-destination
Accidentally inverted in 7637325
1 parent 9db169c commit c928f74

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/nixos-anywhere.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ step() {
123123
}
124124

125125
parseArgs() {
126+
local substituteOnDestination=y
126127
while [[ $# -gt 0 ]]; do
127128
case "$1" in
128129
-f | --flake)
@@ -226,7 +227,7 @@ parseArgs() {
226227
nixOptions+=("--option" "$key" "$value")
227228
;;
228229
--no-substitute-on-destination)
229-
nixCopyOptions+=("--substitute-on-destination")
230+
substituteOnDestination=n
230231
;;
231232
--build-on-remote)
232233
buildOnRemote=y
@@ -253,6 +254,10 @@ parseArgs() {
253254
nixOptions+=("-L")
254255
fi
255256

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

0 commit comments

Comments
 (0)