From b66fd9bee965c4cf12045e960f1cb59e46f8d058 Mon Sep 17 00:00:00 2001 From: Smittix Date: Tue, 20 Jan 2026 18:16:05 +0000 Subject: [PATCH] Fix setup.sh hanging on rtlamr prompt by using ask_yes_no helper Replace raw read commands with ask_yes_no function for rtlamr installation prompts on both macOS and Debian. The helper properly handles non-interactive mode and missing TTY scenarios. Co-Authored-By: Claude Opus 4.5 --- setup.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/setup.sh b/setup.sh index 679f86c..3816b1a 100755 --- a/setup.sh +++ b/setup.sh @@ -443,8 +443,7 @@ install_macos_packages() { if ! cmd_exists rtlamr; then echo info "rtlamr is used for utility meter monitoring (electric/gas/water meters)." - read -r -p "Do you want to install rtlamr? [y/N] " install_rtlamr - if [[ "$install_rtlamr" =~ ^[Yy]$ ]]; then + if ask_yes_no "Do you want to install rtlamr?"; then install_rtlamr_from_source else warn "Skipping rtlamr installation. You can install it later if needed." @@ -762,8 +761,7 @@ install_debian_packages() { if ! cmd_exists rtlamr; then echo info "rtlamr is used for utility meter monitoring (electric/gas/water meters)." - read -r -p "Do you want to install rtlamr? [y/N] " install_rtlamr - if [[ "$install_rtlamr" =~ ^[Yy]$ ]]; then + if ask_yes_no "Do you want to install rtlamr?"; then install_rtlamr_from_source else warn "Skipping rtlamr installation. You can install it later if needed."