From 53a38652f0b551f494c493d870d2dacf859eff41 Mon Sep 17 00:00:00 2001 From: torlando-tech Date: Wed, 29 Oct 2025 10:07:40 -0400 Subject: [PATCH] fix: make bluetoothctl commands non-fatal in container environments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bluetoothctl command was causing CI failures with abort signal (exit 134) in Docker containers where D-Bus is not running or Bluetooth hardware is not available. This is expected behavior in container/CI environments. Changes: - Added `|| true` to bluetoothctl power on command to prevent script failure - Added `2>/dev/null` to bluetoothctl show commands to suppress D-Bus errors - Added clarifying comment about container/CI environment behavior This allows the installer to complete successfully in CI while still attempting to configure Bluetooth on real systems where the hardware is available. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index e2823cb..353970e 100755 --- a/install.sh +++ b/install.sh @@ -653,18 +653,18 @@ if command -v bluetoothctl &> /dev/null; then fi # Check if adapter is powered - if bluetoothctl show | grep -q "Powered: yes"; then + if bluetoothctl show 2>/dev/null | grep -q "Powered: yes"; then print_success "Bluetooth adapter is powered on" else print_warning "Bluetooth adapter is not powered" print_info "Powering on Bluetooth adapter..." - # Power on the adapter - echo -e "power on\nquit" | bluetoothctl > /dev/null 2>&1 + # Power on the adapter (non-fatal in container/CI environments where D-Bus may not be running) + echo -e "power on\nquit" | bluetoothctl > /dev/null 2>&1 || true # Verify it worked sleep 1 - if bluetoothctl show | grep -q "Powered: yes"; then + if bluetoothctl show 2>/dev/null | grep -q "Powered: yes"; then print_success "Bluetooth adapter powered on successfully" else print_error "Failed to power on Bluetooth adapter"