From c928f74206c2242b81b63eb49f1a1bef04105e04 Mon Sep 17 00:00:00 2001 From: Bryan Richter Date: Tue, 17 Sep 2024 15:11:46 +0300 Subject: [PATCH] Re-invert behavior of --no-substitute-on-destination Accidentally inverted in 763732541f3a7579ed5d6ab2111f2c1ab620d915 --- src/nixos-anywhere.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/nixos-anywhere.sh b/src/nixos-anywhere.sh index 7124b852..363a2282 100755 --- a/src/nixos-anywhere.sh +++ b/src/nixos-anywhere.sh @@ -123,6 +123,7 @@ step() { } parseArgs() { + local substituteOnDestination=y while [[ $# -gt 0 ]]; do case "$1" in -f | --flake) @@ -226,7 +227,7 @@ parseArgs() { nixOptions+=("--option" "$key" "$value") ;; --no-substitute-on-destination) - nixCopyOptions+=("--substitute-on-destination") + substituteOnDestination=n ;; --build-on-remote) buildOnRemote=y @@ -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