aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nomsu_environment.lua3
-rw-r--r--nomsu_environment.moon3
2 files changed, 4 insertions, 2 deletions
diff --git a/nomsu_environment.lua b/nomsu_environment.lua
index 71d7d06..ca22389 100644
--- a/nomsu_environment.lua
+++ b/nomsu_environment.lua
@@ -328,6 +328,7 @@ local nomsu_environment = Importer({
local lua_filename = filename:gsub("%.nom$", ".lua")
if environment.FILE_CACHE[filename] then
import_to_1_from(environment, environment.FILE_CACHE[filename], prefix)
+ did_anything = true
_continue_1 = true
break
end
@@ -356,7 +357,7 @@ local nomsu_environment = Importer({
end
end
if not (did_anything) then
- error("File not found: " .. tostring(path), 0)
+ error("File not found: " .. tostring(path) .. "\n(searched in " .. tostring(package.nomsupath) .. ")", 0)
end
import_to_1_from(environment, mod, prefix)
environment.FILE_CACHE[path] = mod
diff --git a/nomsu_environment.moon b/nomsu_environment.moon
index 6986b77..5d7a02c 100644
--- a/nomsu_environment.moon
+++ b/nomsu_environment.moon
@@ -182,6 +182,7 @@ nomsu_environment = Importer{
-- Need to check here to prevent re-running files
if environment.FILE_CACHE[filename]
import_to_1_from(environment, environment.FILE_CACHE[filename], prefix)
+ did_anything = true
continue
-- TODO: don't automatically use precompiled version?
code = if optimization != 0 and Files.read(lua_filename)
@@ -195,7 +196,7 @@ nomsu_environment = Importer{
did_anything = true
break
unless did_anything
- error("File not found: #{path}", 0)
+ error("File not found: #{path}\n(searched in #{package.nomsupath})", 0)
import_to_1_from(environment, mod, prefix)
environment.FILE_CACHE[path] = mod
_currently_running_files\remove!