aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroboo <robo.karasek@gmail.com>2016-07-12 13:18:23 +0200
committerroboo <robo.karasek@gmail.com>2016-07-12 13:18:23 +0200
commit81700083b125d83b763637e36e847c6fea11bf70 (patch)
treec76fe55da4a92a0814d1f8691f55d03f30fd1292
parent47a9e7571f5aefd48d5e8d168bd56f07e296b18e (diff)
parent187f0dee0b77e1f09c9881ac63e4d8b2cd2fd9c8 (diff)
downloadluarocks-81700083b125d83b763637e36e847c6fea11bf70.tar.gz
luarocks-81700083b125d83b763637e36e847c6fea11bf70.tar.bz2
luarocks-81700083b125d83b763637e36e847c6fea11bf70.zip
Merge branch 'master' of https://github.com/keplerproject/luarocks into new-tests
-rw-r--r--src/luarocks/cfg.lua2
-rw-r--r--src/luarocks/fs/win32.lua2
-rw-r--r--src/luarocks/new_version.lua14
3 files changed, 12 insertions, 6 deletions
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua
index 9b1c5902..d58c7407 100644
--- a/src/luarocks/cfg.lua
+++ b/src/luarocks/cfg.lua
@@ -403,7 +403,7 @@ local defaults = {
403 403
404if cfg.platforms.windows then 404if cfg.platforms.windows then
405 local full_prefix = (site_config.LUAROCKS_PREFIX or (os.getenv("PROGRAMFILES")..[[\LuaRocks]])) 405 local full_prefix = (site_config.LUAROCKS_PREFIX or (os.getenv("PROGRAMFILES")..[[\LuaRocks]]))
406 extra_luarocks_module_dir = full_prefix.."\\lua\\?.lua" 406 extra_luarocks_module_dir = full_prefix.."/lua/?.lua"
407 407
408 home_config_file = home_config_file and home_config_file:gsub("\\","/") 408 home_config_file = home_config_file and home_config_file:gsub("\\","/")
409 defaults.fs_use_modules = false 409 defaults.fs_use_modules = false
diff --git a/src/luarocks/fs/win32.lua b/src/luarocks/fs/win32.lua
index 8debaeef..c99cc895 100644
--- a/src/luarocks/fs/win32.lua
+++ b/src/luarocks/fs/win32.lua
@@ -130,6 +130,8 @@ function win32.wrap_script(file, dest, name, version)
130 local wrapname = fs.is_dir(dest) and dest.."/"..base or dest 130 local wrapname = fs.is_dir(dest) and dest.."/"..base or dest
131 wrapname = wrapname..".bat" 131 wrapname = wrapname..".bat"
132 local lpath, lcpath = cfg.package_paths() 132 local lpath, lcpath = cfg.package_paths()
133 lpath = util.remove_path_dupes(lpath, ";")
134 lcpath = util.remove_path_dupes(lcpath, ";")
133 local wrapper = io.open(wrapname, "w") 135 local wrapper = io.open(wrapname, "w")
134 if not wrapper then 136 if not wrapper then
135 return nil, "Could not open "..wrapname.." for writing." 137 return nil, "Could not open "..wrapname.." for writing."
diff --git a/src/luarocks/new_version.lua b/src/luarocks/new_version.lua
index bd73e308..8fc00a86 100644
--- a/src/luarocks/new_version.lua
+++ b/src/luarocks/new_version.lua
@@ -134,15 +134,19 @@ function new_version.command(flags, input, version, url)
134 end 134 end
135 assert(type(input) == "string") 135 assert(type(input) == "string")
136 136
137 local filename = input 137 local filename, err
138 if not input:match("rockspec$") then 138 if input:match("rockspec$") then
139 local err 139 filename, err = fetch.fetch_url(input)
140 if not filename then
141 return nil, err
142 end
143 else
140 filename, err = download.download("rockspec", input) 144 filename, err = download.download("rockspec", input)
141 if not filename then 145 if not filename then
142 return nil, err 146 return nil, err
143 end 147 end
144 end 148 end
145 149
146 local valid_rs, err = fetch.load_rockspec(filename) 150 local valid_rs, err = fetch.load_rockspec(filename)
147 if not valid_rs then 151 if not valid_rs then
148 return nil, err 152 return nil, err
@@ -168,7 +172,7 @@ function new_version.command(flags, input, version, url)
168 end 172 end
169 local new_rockver = new_ver:gsub("-", "") 173 local new_rockver = new_ver:gsub("-", "")
170 174
171 local out_rs = persist.load_into_table(filename) 175 local out_rs, err = persist.load_into_table(filename)
172 local out_name = out_rs.package:lower() 176 local out_name = out_rs.package:lower()
173 out_rs.version = new_rockver.."-"..new_rev 177 out_rs.version = new_rockver.."-"..new_rev
174 178