Skip to content

Commit

Permalink
FIX: correctly handle failed extension downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Jun 15, 2022
1 parent 53108a4 commit dc02d70
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/mezz/sys-load.reb
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ download-extension: function[
try/except [
if exists? file [
; we don't want to overwrite existing files!
log/error ["File already exists:^[[m" file]
log/error 'REBOL ["File already exists:^[[m" file]
return file
]
log/info 'REBOL ["Downloading:^[[m" url]
Expand All @@ -684,7 +684,7 @@ download-extension: function[
write file bin
file: to-real-file file ; makes it absolute
][
log/error ["Failed to download:^[[m" file]
log/error 'REBOL ["Failed to download:^[[m" file]
file: none
]
system/options/log: opt
Expand Down Expand Up @@ -723,7 +723,7 @@ import: function [
]
unless name [
; try to locate as an extension...
if file: any [
either file: any [
locate-extension module
all [
url? mod: select system/modules module
Expand All @@ -734,6 +734,8 @@ import: function [
set [name: mod:] apply :load-module [
file version ver check sum no-share no-lib /import /as module
]
][
mod: none ; failed
]
]
]
Expand Down

0 comments on commit dc02d70

Please sign in to comment.