mirror of
https://github.com/smittix/intercept.git
synced 2026-07-22 08:18:09 -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:
@@ -443,8 +443,7 @@ install_macos_packages() {
|
|||||||
if ! cmd_exists rtlamr; then
|
if ! cmd_exists rtlamr; then
|
||||||
echo
|
echo
|
||||||
info "rtlamr is used for utility meter monitoring (electric/gas/water meters)."
|
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 ask_yes_no "Do you want to install rtlamr?"; then
|
||||||
if [[ "$install_rtlamr" =~ ^[Yy]$ ]]; then
|
|
||||||
install_rtlamr_from_source
|
install_rtlamr_from_source
|
||||||
else
|
else
|
||||||
warn "Skipping rtlamr installation. You can install it later if needed."
|
warn "Skipping rtlamr installation. You can install it later if needed."
|
||||||
@@ -762,8 +761,7 @@ install_debian_packages() {
|
|||||||
if ! cmd_exists rtlamr; then
|
if ! cmd_exists rtlamr; then
|
||||||
echo
|
echo
|
||||||
info "rtlamr is used for utility meter monitoring (electric/gas/water meters)."
|
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 ask_yes_no "Do you want to install rtlamr?"; then
|
||||||
if [[ "$install_rtlamr" =~ ^[Yy]$ ]]; then
|
|
||||||
install_rtlamr_from_source
|
install_rtlamr_from_source
|
||||||
else
|
else
|
||||||
warn "Skipping rtlamr installation. You can install it later if needed."
|
warn "Skipping rtlamr installation. You can install it later if needed."
|
||||||
|
|||||||
Reference in New Issue
Block a user