lune-org/lune

"require" function throw error "File not exist" when required module has syntax error

Closed this issue · 1 comments

Version: lune 0.7.11 (Installed using cargo)

When require a module using filepath, and the target filepath has syntax error, the function throw "File not exist" instead than throw syntax error

test.lua

local test = require("module");
print(test);

module.lua

this is syntax error

return "Hello world";

I think the issue seems to be here, due to some improper conditional handling, should be relatively simple to fix.