diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2015-09-22 11:28:31 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-09-22 11:28:31 -0300 |
| commit | 65718de85ce69ac97b9b454953ce48b29bc3a674 (patch) | |
| tree | 823aecb62b5a42095f9d3845a106717c0fd63d07 | |
| parent | 761fefeb9676ec7ff91e32735346852150f6ff7e (diff) | |
| download | luarocks-65718de85ce69ac97b9b454953ce48b29bc3a674.tar.gz luarocks-65718de85ce69ac97b9b454953ce48b29bc3a674.tar.bz2 luarocks-65718de85ce69ac97b9b454953ce48b29bc3a674.zip | |
Support SCM repos with names ending with ".lua".
Fixes #425.
| -rw-r--r-- | src/luarocks/fetch.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/luarocks/fetch.lua b/src/luarocks/fetch.lua index e92aeddf..5ae05826 100644 --- a/src/luarocks/fetch.lua +++ b/src/luarocks/fetch.lua | |||
| @@ -247,7 +247,10 @@ function fetch.load_local_rockspec(filename, quick) | |||
| 247 | local base = fetch.url_to_base_dir(filebase) | 247 | local base = fetch.url_to_base_dir(filebase) |
| 248 | rockspec.source.dir = rockspec.source.dir | 248 | rockspec.source.dir = rockspec.source.dir |
| 249 | or rockspec.source.module | 249 | or rockspec.source.module |
| 250 | or ((filebase:match("%.lua$") or filebase:match("%.c$")) and ".") | 250 | or ( (filebase:match("%.lua$") or filebase:match("%.c$")) |
| 251 | and (deps.format_is_at_least(rockspec, "3.0") | ||
| 252 | and (fetch.is_basic_protocol(protocol) and "." or base) | ||
| 253 | or ".") ) | ||
| 251 | or base | 254 | or base |
| 252 | if rockspec.dependencies then | 255 | if rockspec.dependencies then |
| 253 | for i = 1, #rockspec.dependencies do | 256 | for i = 1, #rockspec.dependencies do |
