Skip to content

Commit 00b4d99

Browse files
committed
Actually fill in .msg field in luacheck.check_files
1 parent c66e486 commit 00b4d99

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/luacheck/init.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ function luacheck.check_files(files, opts)
114114
local srcs = {}
115115

116116
for i, file in ipairs(files) do
117-
srcs[i] = utils.read_file(file) or {fatal = "I/O"}
117+
local src, err = utils.read_file(file)
118+
srcs[i] = src or {fatal = "I/O", msg = err}
118119
end
119120

120121
return luacheck.check_strings(srcs, opts)

0 commit comments

Comments
 (0)