Skip to content

Commit

Permalink
fix: wrap paths in parentheses + set logpath=.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Jan 18, 2023
1 parent d59c38c commit a39c56c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/entrypoint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ local directory_list = parse_list_args(arg_list[2])
local args = {
checklevel = arg_list[1],
directories = #directory_list > 0 and directory_list or { '' },
configpath = (arg_list[3] ~= '' and workdir .. '/' .. arg_list[3] or nil),
configpath = (arg_list[3] ~= '' and '"' .. workdir .. '/' .. arg_list[3] .. '"' or nil),
}

---@param filename string
Expand Down Expand Up @@ -55,7 +55,7 @@ local function lint(directory)
}
local stdout_file = 'stdout.txt'
local stderr_file = 'stderr.txt'
local logpath = workdir
local logpath = '.'
local cmd = 'lua-language-server --check '
.. directory
.. (args.configpath and ' --configpath=' .. args.configpath or '')
Expand Down Expand Up @@ -86,7 +86,7 @@ end

local success = true
for _, directory in ipairs(args.directories) do
local result = lint(workdir .. '/' .. directory)
local result = lint('"' .. workdir .. '/' .. directory .. '"')
if not result.success then
print('Diagnostics for directory ' .. result.directory .. ':')
print(result.diagnostics)
Expand Down

0 comments on commit a39c56c

Please sign in to comment.