Skip to content

Commit

Permalink
Merge branch 'main' into fix/terraform-install-typos
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Sep 19, 2024
2 parents 502c92f + e4af92b commit a7f056d
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 a7f056d

Please sign in to comment.