Skip to content

Commit d0ad4f2

Browse files
committed
fix linux workflow hidapitester --list test
1 parent 0e5aa47 commit d0ad4f2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/linux.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ jobs:
3737

3838
- name: run hidapitester (Makefile)
3939
shell: bash
40-
run: ./hidapitester --version && ./hidapitester --list 2>&1 || grep -q "No HID devices found"
40+
run: |
41+
./hidapitester --version && output=$(./hidapitester --list 2>&1) || [[ "$output" == *"No HID devices found"* ]]
4142
4243
- name: Configure hidapitester with CMake
4344
run: |
@@ -48,7 +49,8 @@ jobs:
4849
run: cmake --build build --config Release
4950

5051
- name: Run hidapitester (CMake)
51-
run: ./build/hidapitester --version && ./hidapitester --list 2>&1 || grep -q "No HID devices found"
52+
run: |
53+
./hidapitester --version && output=$(./hidapitester --list 2>&1) || [[ "$output" == *"No HID devices found"* ]]
5254
# (we need the grep guard because Linux runners no longer return any devices)
5355

5456
- name: Upload hidapitester artifacts (PR)

0 commit comments

Comments
 (0)