diff --git a/home/.chezmoiscripts/universal/run_before_01-decrypt-age-key.tmpl b/home/.chezmoiscripts/universal/run_before_01-decrypt-age-key.tmpl index 3b391a97..52e5b74f 100644 --- a/home/.chezmoiscripts/universal/run_before_01-decrypt-age-key.tmpl +++ b/home/.chezmoiscripts/universal/run_before_01-decrypt-age-key.tmpl @@ -18,8 +18,8 @@ if [ ! -f "${XDG_CONFIG_HOME}/age/chezmoi.txt" ]; then rm -f "$ENCRYPTED_FILE" FALLBACK_FILENAME="$(echo "$ENCRYPTED_FILE" | sed 's/encrypted_/encrypted-fallback_/')" if [ -f "$FALLBACK_FILENAME" ]; then - NEW_FALLBACK_FILENAME="$(echo "$ENCRYPTED_FILE" | sed 's/encrypted-fallback_//')" - cp "$FALLBACK_FILENAME" "$NEW_FALLBACK_FILENAME" + logg info 'Substituting encrypted-file fallback for `'"$ENCRYPTED_FILE"'`' + cp -f "$FALLBACK_FILENAME" "$(echo "$ENCRYPTED_FILE" | sed 's/encrypted_//')" fi done fi