diff --git a/pkgs/agenix.sh b/pkgs/agenix.sh index 27a53c9..5e001fa 100644 --- a/pkgs/agenix.sh +++ b/pkgs/agenix.sh @@ -181,6 +181,8 @@ function edit { @ageBin@ "${ENCRYPT[@]}" <"$CLEARTEXT_FILE" || exit 1 + mkdir -p "$(dirname $FILE)" + mv -f "$REENCRYPTED_FILE" "$FILE" }