fix: make bluetoothctl commands non-fatal in container environments
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 <noreply@anthropic.com>
This commit is contained in:
parent
eebdeb3907
commit
53a38652f0
1 changed files with 4 additions and 4 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue