Skip to content

Update bluetooth.sh#38

Open
prschopf wants to merge 1 commit intobiglinux:mainfrom
prschopf:main
Open

Update bluetooth.sh#38
prschopf wants to merge 1 commit intobiglinux:mainfrom
prschopf:main

Conversation

@prschopf
Copy link
Contributor

@prschopf prschopf commented Mar 9, 2026

Com a alteração deste comando, o timeout estava inócuo pois atuava sobre o echo e não sobre o bluetoothctl. De qualquer forma, na versão anterior, este timeout era inócuo também pois como estava num pipe, o código de saída era sempre do último comando executado.

Com esta alteração e com a linha set -o pipefail, o codigo de retorno de erro é de qualquer comando dentro do pipe.

Para testar isso, faça:
echo "show" | timeout 0.000000000001 sort <- retorna erro
echo "show" | timeout 0.000000000001 sort | ls <- retorna ok

usando set -o pipefail:
echo "show" | timeout 0.000000000001 sort | ls <- retorna erro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant