summaryrefslogtreecommitdiffstats
path: root/provisioning-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'provisioning-model.lua')
-rw-r--r--provisioning-model.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/provisioning-model.lua b/provisioning-model.lua
index 3efba54..8acc8ca 100644
--- a/provisioning-model.lua
+++ b/provisioning-model.lua
@@ -260,7 +260,7 @@ validateparamcoded = function(p, top)
end
local function callscript(script, ...)
- local result
+ local result={}
local env = {}
setmetatable (env, {__index = _G})
-- loadfile loads into the global environment
@@ -274,6 +274,9 @@ local function callscript(script, ...)
if not res and err then
assert(res, "Exception in "..script.." script\n"..err)
end
+ elseif posix.stat(script) then
+ -- file exists, but wouldn't load
+ error("Failed to load "..script, 0)
end
setfenv (0, _G)
return unpack(result)