File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,7 @@ function find_download_url() {
203
203
lower_line=$( echo " $line " | tr ' [A-Z]' ' [a-z]' )
204
204
if [[ " $lower_line " =~ $regexp ]]; then
205
205
print_debug " $line ... Match!"
206
+ found=" true"
206
207
line=" ${BASH_REMATCH[0]} "
207
208
line=${line: 1}
208
209
line=${line::- 1}
@@ -211,6 +212,13 @@ function find_download_url() {
211
212
print_debug " $line ... Doesn't match"
212
213
fi
213
214
done
215
+
216
+ # If asset matched, return
217
+ if [[ " $found " == " true" ]]; then
218
+ return
219
+ fi
220
+
221
+ print_debug " No download URLs found!"
214
222
}
215
223
216
224
function find_digest_for_url() {
@@ -331,6 +339,13 @@ function command_install() {
331
339
332
340
# Find the download URL
333
341
local download_url=$( find_download_url " $tmp_dir /release.json" )
342
+
343
+ if [[ -z " $download_url " ]]; then
344
+ local os=$( get_os)
345
+ local arch=$( get_arch)
346
+ throw_error 18 " Could not find any assets matching your OS ($os ) and Arch ($arch )."
347
+ fi
348
+
334
349
print_debug " Download URL:\n$download_url "
335
350
336
351
# Check if several download URLs were found
You can’t perform that action at this time.
0 commit comments