aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2022-04-11 16:15:15 -0300
committerHisham Muhammad <hisham@gobolinux.org>2022-04-11 17:02:28 -0300
commiteddf776d64941454377f996733f96873cb79bcae (patch)
tree9ca362c77bd1827feb872f8b67650821012a9d4d /src
parent21c84dad3ff4e0de10b813260b6a5247771d6754 (diff)
downloadluarocks-eddf776d64941454377f996733f96873cb79bcae.tar.gz
luarocks-eddf776d64941454377f996733f96873cb79bcae.tar.bz2
luarocks-eddf776d64941454377f996733f96873cb79bcae.zip
Changes for building the all-in-one binary with Lua 5.4
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/fs/tools.lua2
-rw-r--r--src/luarocks/fs/unix.lua3
-rw-r--r--src/luarocks/fs/win32.lua3
3 files changed, 5 insertions, 3 deletions
diff --git a/src/luarocks/fs/tools.lua b/src/luarocks/fs/tools.lua
index 623e5a90..0a154794 100644
--- a/src/luarocks/fs/tools.lua
+++ b/src/luarocks/fs/tools.lua
@@ -57,7 +57,7 @@ do
57 local current = cache_pwd 57 local current = cache_pwd
58 if not current then 58 if not current then
59 local pipe = io.popen(fs.quiet_stderr(vars.PWD)) 59 local pipe = io.popen(fs.quiet_stderr(vars.PWD))
60 current = pipe:read("*l"):gsub("%s*", "") 60 current = pipe:read("*a"):gsub("^%s*", ""):gsub("%s*$", "")
61 pipe:close() 61 pipe:close()
62 cache_pwd = current 62 cache_pwd = current
63 end 63 end
diff --git a/src/luarocks/fs/unix.lua b/src/luarocks/fs/unix.lua
index 2c66eaa3..0065753e 100644
--- a/src/luarocks/fs/unix.lua
+++ b/src/luarocks/fs/unix.lua
@@ -90,7 +90,8 @@ function unix.wrap_script(script, target, deps_mode, name, version, ...)
90 } 90 }
91 91
92 local remove_interpreter = false 92 local remove_interpreter = false
93 if target == "luarocks" or target == "luarocks-admin" then 93 local base = dir.base_name(target):gsub("%..*$", "")
94 if base == "luarocks" or base == "luarocks-admin" then
94 if cfg.is_binary then 95 if cfg.is_binary then
95 remove_interpreter = true 96 remove_interpreter = true
96 end 97 end
diff --git a/src/luarocks/fs/win32.lua b/src/luarocks/fs/win32.lua
index 1902a691..a3f42df7 100644
--- a/src/luarocks/fs/win32.lua
+++ b/src/luarocks/fs/win32.lua
@@ -167,7 +167,8 @@ function win32.wrap_script(script, target, deps_mode, name, version, ...)
167 } 167 }
168 168
169 local remove_interpreter = false 169 local remove_interpreter = false
170 if target == "luarocks" or target == "luarocks-admin" then 170 local base = dir.base_name(target):gsub("%..*$", "")
171 if base == "luarocks" or base == "luarocks-admin" then
171 if cfg.is_binary then 172 if cfg.is_binary then
172 remove_interpreter = true 173 remove_interpreter = true
173 end 174 end