mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 06:40:00 -07:00
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 <noreply@anthropic.com>
This commit is contained in:
6
setup.sh
6
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."
|
||||
|
||||
Reference in New Issue
Block a user