Skip to content

Commit 413005b

Browse files
committed
handle case where board package is already installed, and return success
1 parent 744bf8b commit 413005b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/arduino_ci/arduino_cmd.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ def board_installed?(boardname)
135135
# @return [bool] whether the command succeeded
136136
def install_boards(boardfamily)
137137
# TODO: find out why IO.pipe fails but File::NULL succeeds :(
138-
run_and_capture(flag_install_boards, boardfamily, out: File::NULL)[:success]
138+
result = run_and_capture(flag_install_boards, boardfamily)
139+
already_installed = result[:err].include?("Platform is already installed!")
140+
result[:success] || already_installed
139141
end
140142

141143
# install a library by name

0 commit comments

Comments
 (0)