diff --git a/lib/optimize/tasks.sh b/lib/optimize/tasks.sh index 0f69863..47e0903 100644 --- a/lib/optimize/tasks.sh +++ b/lib/optimize/tasks.sh @@ -641,6 +641,7 @@ opt_bluetooth_reset() { fi local spinner_started="false" + local disconnect_notice="Bluetooth devices may disconnect briefly during refresh" if [[ -t 1 ]]; then MOLE_SPINNER_PREFIX=" " start_inline_spinner "Checking Bluetooth..." spinner_started="true" @@ -688,6 +689,7 @@ opt_bluetooth_reset() { fi if sudo pkill -TERM bluetoothd > /dev/null 2>&1; then + echo -e " ${GRAY}${ICON_WARNING}${NC} ${GRAY}${disconnect_notice}${NC}" sleep 1 if pgrep -x bluetoothd > /dev/null 2>&1; then sudo pkill -KILL bluetoothd > /dev/null 2>&1 || true @@ -707,6 +709,7 @@ opt_bluetooth_reset() { if [[ "$spinner_started" == "true" ]]; then stop_inline_spinner fi + echo -e " ${YELLOW}${ICON_DRY_RUN}${NC} ${disconnect_notice}" opt_msg "Bluetooth module restarted" opt_msg "Connectivity issues resolved" fi diff --git a/tests/clean_system_maintenance.bats b/tests/clean_system_maintenance.bats index 64a647f..048fdeb 100644 --- a/tests/clean_system_maintenance.bats +++ b/tests/clean_system_maintenance.bats @@ -1520,6 +1520,7 @@ opt_bluetooth_reset EOF [ "$status" -eq 0 ] + [[ "$output" == *"Bluetooth devices may disconnect briefly during refresh"* ]] [[ "$output" == *"Bluetooth module restarted"* ]] }