aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/luarocks/fetch.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/luarocks/fetch.lua b/src/luarocks/fetch.lua
index 874dc33f..80ca4400 100644
--- a/src/luarocks/fetch.lua
+++ b/src/luarocks/fetch.lua
@@ -313,10 +313,9 @@ function fetch_sources(rockspec, extract, dest_dir)
313 and #rockspec.source.pathname > 0 then 313 and #rockspec.source.pathname > 0 then
314 if #cfg.only_sources_from == 0 then 314 if #cfg.only_sources_from == 0 then
315 return nil, "Can't download "..rockspec.source.url.." -- download from remote servers disabled" 315 return nil, "Can't download "..rockspec.source.url.." -- download from remote servers disabled"
316 elseif not rockspec.source.pathname:match("^"..cfg.only_sources_from) then 316 elseif rockspec.source.pathname:find(cfg.only_sources_from, 1, true) ~= 1 then
317 return nil, "Can't download "..rockspec.source.url.." -- only downloading from "..cfg.only_sources_from 317 return nil, "Can't download "..rockspec.source.url.." -- only downloading from "..cfg.only_sources_from
318 end 318 end
319 end 319 end
320
321 return proto.get_sources(rockspec, extract, dest_dir) 320 return proto.get_sources(rockspec, extract, dest_dir)
322end 321end