From df8a3cd3c957db337bfc3ab4d404c33066a24923 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 11 Apr 2022 19:13:28 -0300 Subject: fs: try to accept a quoted filename with spaces --- src/luarocks/fs/lua.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/luarocks/fs/lua.lua b/src/luarocks/fs/lua.lua index 96017daa..14bf0369 100644 --- a/src/luarocks/fs/lua.lua +++ b/src/luarocks/fs/lua.lua @@ -122,7 +122,7 @@ function fs_lua.is_tool_available(tool_cmd, tool_name) if tool_available_cache[tool_name] ~= nil then ok = tool_available_cache[tool_name] else - local tool_cmd_no_args = tool_cmd:gsub(" .*", "") + local tool_cmd_no_args = tool_cmd:gsub(" [^\"]*$", "") -- if it looks like the tool has a pathname, try that first if tool_cmd_no_args:match("[/\\]") then -- cgit v1.2.3-55-g6feb