Skip to content

Commit

Permalink
Merge pull request #386 from chreekat/b/fix-substitute-on-destination
Browse files Browse the repository at this point in the history
Re-invert behavior of --no-substitute-on-destination
  • Loading branch information
Mic92 committed Sep 19, 2024
2 parents 9db169c + 95efb19 commit e4af92b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/nixos-anywhere.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ step() {
}

parseArgs() {
local substituteOnDestination=y
local printBuildLogs=n
while [[ $# -gt 0 ]]; do
case "$1" in
-f | --flake)
Expand Down Expand Up @@ -226,7 +228,7 @@ parseArgs() {
nixOptions+=("--option" "$key" "$value")
;;
--no-substitute-on-destination)
nixCopyOptions+=("--substitute-on-destination")
substituteOnDestination=n
;;
--build-on-remote)
buildOnRemote=y
Expand All @@ -249,10 +251,14 @@ parseArgs() {
shift
done

if [[ ${printBuildLogs-n} == "y" ]]; then
if [[ ${printBuildLogs} == "y" ]]; then
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 e4af92b

Please sign in to comment.