summaryrefslogtreecommitdiff
path: root/xmake/scripts/action/action.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-06-20 19:47:54 +0800
committerruki <[email protected]>2015-06-20 19:47:54 +0800
commit12e518a819bb848c67452655abdfcce5c0d90bd2 (patch)
treebed9d450f1e0f63be5a5f57fcb62672e8bcf4765 /xmake/scripts/action/action.lua
parent2ee74d41c449192a66a2bc5cc1ca64fbc952c626 (diff)
copy subfiles with pattern
Diffstat (limited to 'xmake/scripts/action/action.lua')
-rw-r--r--xmake/scripts/action/action.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/xmake/scripts/action/action.lua b/xmake/scripts/action/action.lua
index 5602bf4ab..f3f2a1ba8 100644
--- a/xmake/scripts/action/action.lua
+++ b/xmake/scripts/action/action.lua
@@ -26,6 +26,7 @@ local action = action or {}
-- load modules
local os = require("base/os")
local path = require("base/path")
+local utils = require("base/utils")
local global = require("base/global")
local config = require("base/config")
local project = require("base/project")
@@ -45,6 +46,12 @@ function action._load_project()
local options = xmake._OPTIONS
assert(options)
+ -- enter the project directory
+ if not os.cd(xmake._PROJECT_DIR) then
+ -- error
+ return string.format("not found project: %s!", xmake._PROJECT_DIR)
+ end
+
-- check the project file
if not os.isfile(xmake._PROJECT_FILE) then
return string.format("not found the project file: %s", xmake._PROJECT_FILE)