Skip to content

Commit

Permalink
support local resource #4528
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Dec 23, 2023
1 parent 728f688 commit 949e583
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ function _download(package, resource_name, resource_url, resource_hash)
if localfile and os.isfile(localfile) then
-- we can use local resource from the search directories directly if network is too slow
os.cp(localfile, resource_file)
elseif os.isfile(resource_url) then
os.cp(resource_url, resource_file)
elseif resource_url:find(string.ipattern("https-://")) or resource_url:find(string.ipattern("ftps-://")) then
http.download(resource_url, resource_file, {
insecure = global.get("insecure-ssl"),
Expand Down

0 comments on commit 949e583

Please sign in to comment.