From 8863788a986e11d564c98af0de89def47c83193c Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Tue, 12 Nov 2013 16:45:24 -0200 Subject: Merge changes proposed by @siffiejoe in #172. (Sorry about the clumsiness of not doing a proper merge.) --- src/bin/luarocks | 1 + src/bin/luarocks-admin | 1 + src/luarocks/cfg.lua | 6 ------ 3 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/bin/luarocks b/src/bin/luarocks index e28b17b8..6ab27fa3 100755 --- a/src/bin/luarocks +++ b/src/bin/luarocks @@ -1,5 +1,6 @@ #!/usr/bin/env lua +local loader = require("luarocks.loader") local command_line = require("luarocks.command_line") program_description = "LuaRocks main command-line interface" diff --git a/src/bin/luarocks-admin b/src/bin/luarocks-admin index 4c5613ca..983dda87 100755 --- a/src/bin/luarocks-admin +++ b/src/bin/luarocks-admin @@ -1,5 +1,6 @@ #!/usr/bin/env lua +local loader = require("luarocks.loader") local command_line = require("luarocks.command_line") program_description = "LuaRocks repository administration interface" diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua index 86d7d585..e3d924fb 100644 --- a/src/luarocks/cfg.lua +++ b/src/luarocks/cfg.lua @@ -493,12 +493,6 @@ function package_paths() return table.concat(new_path, ";"), table.concat(new_cpath, ";") end -do - local new_path, new_cpath = package_paths() - package.path = new_path..";"..package.path - package.cpath = new_cpath..";"..package.cpath -end - function which_config() return sys_config_file, sys_config_ok, home_config_file, home_config_ok end -- cgit v1.2.3-55-g6feb From 64bf574dbb1fcd190ba22aa026a69d81d2d0bd5b Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Tue, 12 Nov 2013 20:34:25 +0100 Subject: added quoting to os command, failed with paths containing spaces --- src/luarocks/fs/win32/tools.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/luarocks/fs/win32/tools.lua b/src/luarocks/fs/win32/tools.lua index e08de97a..979aaff4 100644 --- a/src/luarocks/fs/win32/tools.lua +++ b/src/luarocks/fs/win32/tools.lua @@ -42,7 +42,7 @@ end function current_dir() local current = cfg.cache_pwd if not current then - local pipe = io.popen(vars.PWD) + local pipe = io.popen(fs.Q(vars.PWD)) current = pipe:read("*l") pipe:close() cfg.cache_pwd = current -- cgit v1.2.3-55-g6feb