From 96306cbf6c0c46b8e0541b6da0def1d78d8464ae Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sun, 18 Feb 2024 20:21:18 -0300 Subject: normalize project dir Avoid showing things like `/foo/bar/../.././lua_modules` when running `luarocks path`. --- src/luarocks/cmd.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 local try = "." for _ = 1, 10 do -- FIXME detect when root dir was hit instead if util.exists(try .. "/.luarocks") and util.exists(try .. "/lua_modules") then - return try, false + return dir.normalize(try), false elseif util.exists(try .. "/.luarocks-no-project") then break end -- cgit v1.2.3-55-g6feb