diff options
| author | ruki <[email protected]> | 2020-02-19 23:22:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-02-19 14:16:31 +0800 |
| commit | 656314dce0e87308babf2f49a35793a3167e849b (patch) | |
| tree | 231bdde613bd6e1374607dcd42c281e9f60d3abf /xmake/core/base/global.lua | |
| parent | 9201a7b6b9f0b25312130f8eeae73d546532c013 (diff) | |
improve reconfigure for trybuild
Diffstat (limited to 'xmake/core/base/global.lua')
| -rw-r--r-- | xmake/core/base/global.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xmake/core/base/global.lua b/xmake/core/base/global.lua index e86c1517c..d777d1243 100644 --- a/xmake/core/base/global.lua +++ b/xmake/core/base/global.lua @@ -28,11 +28,6 @@ local path = require("base/path") local utils = require("base/utils") local option = require("base/option") --- get the configure file -function global._file() - return path.join(global.directory(), "xmake.conf") -end - -- get the current given configure function global.get(name) local value = nil @@ -91,6 +86,11 @@ function global.options() return configs end +-- get the configure file +function global.filepath() + return path.join(global.directory(), "xmake.conf") +end + -- get the global configure directory function global.directory() if global._DIRECTORY == nil then @@ -104,7 +104,7 @@ end function global.load() -- load configure from the file first - local filepath = global._file() + local filepath = global.filepath() if os.isfile(filepath) then -- load configs @@ -134,7 +134,7 @@ function global.save() options.__version = xmake._VERSION_SHORT -- save it - return io.save(global._file(), options) + return io.save(global.filepath(), options) end -- clear config |
