summaryrefslogtreecommitdiff
path: root/xmake/core/_xmake_main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/_xmake_main.lua')
-rw-r--r--xmake/core/_xmake_main.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/core/_xmake_main.lua b/xmake/core/_xmake_main.lua
index 9e80593fe..93f225c56 100644
--- a/xmake/core/_xmake_main.lua
+++ b/xmake/core/_xmake_main.lua
@@ -66,6 +66,11 @@ function _loadfile_impl(filepath, mode, opt)
end
io.file_close(file)
+ -- do on_load()
+ if opt.on_load then
+ data = opt.on_load(data) or data
+ end
+
-- load script from string
return load(data, "@" .. displaypath, mode)
end