fix: install.sh — read et fzf lisent depuis /dev/tty (compatibilité curl | bash)

Sans </dev/tty, stdin est le pipe curl et les prompts interactifs
(question fzf, question installation fzf) ne répondent pas.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-16 05:00:45 +02:00
parent 8a38aec0a0
commit e3b9a7f59a
4 changed files with 187 additions and 4 deletions
+2 -2
View File
@@ -76,7 +76,7 @@ _install_fzf_binary() {
install_fzf() {
warn "fzf non trouvé."
echo -e " ${GRV_FG}Installer fzf ? [o/N]${RESET} \c"
read -r answer
read -r answer </dev/tty
[[ "$answer" != "o" && "$answer" != "O" ]] && err "fzf requis. Abandon." && exit 1
if command -v apt-get &>/dev/null; then
debug "Installation via apt"
@@ -392,7 +392,7 @@ LIST_EOF
--prompt="Skills > " \
--header="$legend" \
--bind="tab:execute-silent($cycle_script '$STATE_FILE' '$fns_file' {n})+reload($list_script)" \
< <(bash "$list_script") > /dev/null || true
< <(bash "$list_script") > /dev/null </dev/tty || true
rm -f "$cycle_script" "$list_script" "$fns_file"
}