Skip to content

Commit 968f592

Browse files
dudeofawesomemergify[bot]
authored andcommitted
fix(disk-encryption-keys): ensure the target dir exists
1 parent 85d2dd6 commit 968f592

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nixos-anywhere.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ runDisko() {
529529
local diskoScript=$1
530530
for path in "${!diskEncryptionKeys[@]}"; do
531531
step "Uploading ${diskEncryptionKeys[$path]} to $path"
532-
runSsh "umask 077; cat > $path" <"${diskEncryptionKeys[$path]}"
532+
runSsh "umask 077; mkdir -p \"$(dirname "$path")\"; cat > $path" <"${diskEncryptionKeys[$path]}"
533533
done
534534
if [[ -n ${diskoScript} ]]; then
535535
nixCopy --to "ssh://$sshConnection" "$diskoScript"

0 commit comments

Comments
 (0)