File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
10
10
11
11
### Changed
12
12
- Simplified the use of ` Array.each ` with a return statement; it's now simply ` Array.find `
13
+ - ` autolocate! ` for Arduino installations now raises ` ArduinoInstallationError ` if ` force_install ` fails
13
14
14
15
### Deprecated
15
16
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ def execute
186
186
elsif File . exist? extracted_file
187
187
install
188
188
else
189
- puts "Arduino force-install failed "
189
+ puts "Could not find extracted archive (tried #{ extracted_file } ) "
190
190
end
191
191
192
192
File . exist? self . class . force_install_location
Original file line number Diff line number Diff line change 13
13
14
14
module ArduinoCI
15
15
16
+ class ArduinoInstallationError < StandardError ; end
17
+
16
18
# Manage the OS-specific install location of Arduino
17
19
class ArduinoInstallation
18
20
@@ -94,7 +96,8 @@ def autolocate!
94
96
return candidate unless candidate . nil?
95
97
96
98
# force the install
97
- force_install
99
+ raise ArduinoInstallationError , "Failed to force-install Arduino" unless force_install
100
+
98
101
autolocate
99
102
end
100
103
You can’t perform that action at this time.
0 commit comments