summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-07-23 19:56:41 +0800
committerOpportunityLiu <[email protected]>2019-07-23 19:56:41 +0800
commit769878b5089a1c44d425907ab5e891ee3e4a00d0 (patch)
tree8ff5500da9fea6099cafd31e7f5b4b7131364262
parentd46f79c50f0e8c71fba605d8f3be3358c8569d62 (diff)
fix
-rw-r--r--xmake/core/_xmake_main.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/xmake/core/_xmake_main.lua b/xmake/core/_xmake_main.lua
index 058d47920..ef3dadd12 100644
--- a/xmake/core/_xmake_main.lua
+++ b/xmake/core/_xmake_main.lua
@@ -11,7 +11,7 @@
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
---
+--
-- Copyright (C) 2015 - 2019, TBOOX Open Source Group.
--
-- @author ruki
@@ -31,12 +31,10 @@ xmake._PROJECT_DIR = _PROJECT_DIR
xmake._PROJECT_FILE = "xmake.lua"
xmake._WORKING_DIR = _WORKING_DIR
-local _loadfile = _loadfile or loadfile
-
-- init loadfile
local _loadfile = _loadfile or loadfile
local _loadcache = {}
-function loadfile(filepath)
+function loadfile(filepath, mode)
-- get absolute path
filepath = path.absolute(filepath)
@@ -51,7 +49,7 @@ function loadfile(filepath)
end
-- load file
- local script, errors = _loadfile(filepath)
+ local script, errors = _loadfile(filepath, mode)
if script then
_loadcache[filepath] = {script = script, mtime = mtime or os.mtime(filepath)}
end