update 1.2.2.2 beta

This commit is contained in:
MacRimi
2026-06-12 00:05:58 +02:00
parent 450fceec62
commit 382493ca84
4 changed files with 26 additions and 82 deletions

View File

@@ -1165,10 +1165,8 @@ hb_ensure_borg() {
hb_borg_init_if_needed() {
local borg_bin="$1" repo="$2" encrypt_mode="$3"
# Borg reads passphrase prompts from /dev/tty even when stdout/stderr
# are redirected — so `>/dev/null 2>&1` is not enough to silence it.
# Close stdin (`</dev/null`) so any prompt fails fast instead of
# hijacking the operator's input under the active dialog window.
# `</dev/null` because borg reads passphrase prompts from /dev/tty,
# which `>/dev/null 2>&1` does not suppress.
if "$borg_bin" list "$repo" </dev/null >/dev/null 2>&1; then
return 0
fi
@@ -1193,11 +1191,6 @@ hb_prepare_borg_passphrase() {
return 0
fi
# Saved target, no pw yet — ask once and persist next to its config.
# The title is explicit about which passphrase: operators were typing
# their SSH/server password here, which silently persisted as the
# repokey passphrase and made every subsequent `borg list` fail with
# "passphrase ... is incorrect", dropping them back to the menu with
# only a one-second red flash for feedback.
local sel_pass
sel_pass=$(dialog --backtitle "ProxMenux" --colors --insecure \
--title "$(hb_translate "Borg repository passphrase")" \
@@ -1802,11 +1795,8 @@ hb_select_borg_repo() {
if [[ "$choice" == "$add_idx" ]]; then
hb_configure_borg_manual _borg_repo_ref || return 1
# The new target is saved under HB_BORG_LAST_SAVED_NAME. Promote
# it to SELECTED so hb_prepare_borg_passphrase enters the saved-
# target branch (one passphrase prompt, then persist), instead
# of the brand-new branch (the "¿Cifrar?" yes/no flow that also
# races with borg picking up the repokey prompt on the TTY).
# Promote the freshly-saved target so hb_prepare_borg_passphrase
# takes the saved-target branch (single prompt + persist).
if [[ -n "${HB_BORG_LAST_SAVED_NAME:-}" ]]; then
HB_BORG_SELECTED_NAME="$HB_BORG_LAST_SAVED_NAME"
HB_BORG_SELECTED_PASS=""
@@ -1848,11 +1838,8 @@ hb_select_borg_repo() {
else
unset BORG_RSH
fi
# Saved URL may differ from the repo's recorded location by one
# trailing slash (e.g. ssh://host//path vs ssh://host/path). Borg
# prompts y/N to confirm — without a TTY the answer is empty and
# borg aborts with a red one-liner, dropping the user back to the
# menu. Trust the saved target.
# Trust the saved URL/key — skip borg's interactive y/N confirmations
# when the recorded repo location or encryption status drifts.
export BORG_RELOCATED_REPO_ACCESS_IS_OK=yes
export BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes
HB_BORG_SELECTED_NAME="${HB_BORG_NAMES[$sel]}"
@@ -2597,9 +2584,6 @@ hb_show_compat_report() {
local tmpfile
tmpfile=$(mktemp)
# Leading blank line before the summary — dialog's --textbox draws the
# title flush to the top border, and stacking the summary directly under
# it looks cramped. One empty line gives the eye a break before the data.
{
printf '\n%s\n' "$summary"
printf '%s\n\n' "────────────────────────────────────────────────────────────"