Skip to content

Commit d0c3bbf

Browse files
committed
guess when graphical error message prevents command from completing
1 parent dc2b35f commit d0c3bbf

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/arduino_ci/arduino_cmd.rb

+7-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,13 @@ def run_and_capture(*args)
7676
end
7777

7878
def board_installed?(board)
79-
run("--board", board)
79+
# On Travis CI, we get an error message in the GUI instead of on STDERR
80+
# so, assume that if we don't get a rapid reply that things are not installed
81+
Timeout.timeout(@prefs_response_time * 3) do
82+
run("--board", board)
83+
end
84+
rescue Timeout::Error
85+
false
8086
end
8187

8288
end

0 commit comments

Comments
 (0)