aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2024-02-18 20:21:18 -0300
committerHisham Muhammad <hisham@gobolinux.org>2024-02-19 08:23:11 -0300
commit96306cbf6c0c46b8e0541b6da0def1d78d8464ae (patch)
tree68dd2b0c146cf1278f040a3070531c629709e334
parentb1fd49273ed6691283f55eeb3f318214618e3f18 (diff)
downloadluarocks-96306cbf6c0c46b8e0541b6da0def1d78d8464ae.tar.gz
luarocks-96306cbf6c0c46b8e0541b6da0def1d78d8464ae.tar.bz2
luarocks-96306cbf6c0c46b8e0541b6da0def1d78d8464ae.zip
normalize project dir
Avoid showing things like `/foo/bar/../.././lua_modules` when running `luarocks path`.
-rw-r--r--src/luarocks/cmd.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luarocks/cmd.lua b/src/luarocks/cmd.lua
index 9c3d91db..3cbe3852 100644
--- a/src/luarocks/cmd.lua
+++ b/src/luarocks/cmd.lua
@@ -224,7 +224,7 @@ do
224 local try = "." 224 local try = "."
225 for _ = 1, 10 do -- FIXME detect when root dir was hit instead 225 for _ = 1, 10 do -- FIXME detect when root dir was hit instead
226 if util.exists(try .. "/.luarocks") and util.exists(try .. "/lua_modules") then 226 if util.exists(try .. "/.luarocks") and util.exists(try .. "/lua_modules") then
227 return try, false 227 return dir.normalize(try), false
228 elseif util.exists(try .. "/.luarocks-no-project") then 228 elseif util.exists(try .. "/.luarocks-no-project") then
229 break 229 break
230 end 230 end