Skip to content

Commit

Permalink
Re-invert behavior of --no-substitute-on-destination
Browse files Browse the repository at this point in the history
Accidentally inverted in 7637325
  • Loading branch information
chreekat authored and Mic92 committed Sep 18, 2024
1 parent 9db169c commit dcae7a8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/nixos-anywhere.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ step() {
}

parseArgs() {
local substituteOnDestination=y
while [[ $# -gt 0 ]]; do
case "$1" in
-f | --flake)
Expand Down Expand Up @@ -226,7 +227,7 @@ parseArgs() {
nixOptions+=("--option" "$key" "$value")
;;
--no-substitute-on-destination)
nixCopyOptions+=("--substitute-on-destination")
substituteOnDestination=n
;;
--build-on-remote)
buildOnRemote=y
Expand All @@ -253,6 +254,10 @@ parseArgs() {
nixOptions+=("-L")
fi

if [[ substituteOnDestination == "y" ]]; then
nixCopyOptions+=("--substitute-on-destination")
fi

if [[ $vmTest == "n" ]] && [[ -z ${sshConnection} ]]; then
abort "ssh-host must be set"
fi
Expand Down

0 comments on commit dcae7a8

Please sign in to comment.