Merge pull request #386 from chreekat/b/fix-substitute-on-destination

Re-invert behavior of --no-substitute-on-destination
This commit is contained in:
Jörg Thalheim 2024-09-19 14:07:42 +02:00 committed by GitHub
commit e4af92bcf6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,6 +123,8 @@ step() {
}
parseArgs() {
local substituteOnDestination=y
local printBuildLogs=n
while [[ $# -gt 0 ]]; do
case "$1" in
-f | --flake)
@ -226,7 +228,7 @@ parseArgs() {
nixOptions+=("--option" "$key" "$value")
;;
--no-substitute-on-destination)
nixCopyOptions+=("--substitute-on-destination")
substituteOnDestination=n
;;
--build-on-remote)
buildOnRemote=y
@ -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