diff options
| author | ruki <[email protected]> | 2015-05-04 22:05:39 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-05-04 23:42:09 +0800 |
| commit | 00cd7e605400a459822294f3ceff5194cf9b56d5 (patch) | |
| tree | b600091426bc69a535338cc84e702f16d6f7b044 /xmake/scripts/base/main.lua | |
| parent | 781bfd2dc99c8e0ca3063b6a3d6199f2390951f4 (diff) | |
add some path and string interfaces
Diffstat (limited to 'xmake/scripts/base/main.lua')
| -rw-r--r-- | xmake/scripts/base/main.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/xmake/scripts/base/main.lua b/xmake/scripts/base/main.lua index 56e259efd..a0e94634a 100644 --- a/xmake/scripts/base/main.lua +++ b/xmake/scripts/base/main.lua @@ -21,9 +21,10 @@ -- -- define module: main -local main = {} +local main = main or {} -- load modules +local path = require("base/path") local utils = require("base/utils") local option = require("base/option") @@ -305,12 +306,13 @@ function main.done_option() -- init the project directory options.project = options.project or _PROJECT_DIR - options.project = path.getabsolute(options.project) - print(options.project) + options.project = path.absolute(options.project) + assert(options.project) -- init the xmake.lua file path options.file = options.file or "xmake.lua" - print(options.file) + options.file = path.absolute(options.file, options.project) + assert(options.file) -- done action return main.done_action() |
