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 committed Sep 17, 2024
1 parent 9db169c commit a86402e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/nixos-anywhere.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ trap 'rm -rf "$sshKeyDir"' EXIT
mkdir -p "$sshKeyDir"

declare -A diskEncryptionKeys=()
declare -a nixCopyOptions=()
# Option '--no-substitute-on-destination' relies on this being initialized in
# this way.
declare -a nixCopyOptions=("--substitute-on-destination")
declare -a sshArgs=()

showUsage() {
Expand Down Expand Up @@ -226,7 +228,9 @@ parseArgs() {
nixOptions+=("--option" "$key" "$value")
;;
--no-substitute-on-destination)
nixCopyOptions+=("--substitute-on-destination")
# "--substitute-on-destination" is the first element, assigned at
# initalization
unset "nixCopyOptions[0]"
;;
--build-on-remote)
buildOnRemote=y
Expand Down

0 comments on commit a86402e

Please sign in to comment.