Skip to content

Commit

Permalink
Merge pull request #221 from CobaltCause/edit-mkdir-p
Browse files Browse the repository at this point in the history
create leading directories if they don't exist
  • Loading branch information
ryantm committed Dec 20, 2023
2 parents 13ac9ac + 65fe595 commit 6cb7cd6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkgs/agenix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ function edit {

@ageBin@ "${ENCRYPT[@]}" <"$CLEARTEXT_FILE" || exit 1

mv -f "$REENCRYPTED_FILE" "$1"
mkdir -p "$(dirname "$FILE")"

mv -f "$REENCRYPTED_FILE" "$FILE"
}

function rekey {
Expand Down

0 comments on commit 6cb7cd6

Please sign in to comment.