diff options
| author | ruki <[email protected]> | 2018-09-17 23:27:42 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-09-17 14:46:14 +0800 |
| commit | b39865ce22ec806099bd022f47fcb90a4ac42034 (patch) | |
| tree | b8f87745eff3541b5691941dc69d03b9060a4971 /xmake/core/base/global.lua | |
| parent | eceee6a9d0f2f76e1b8cae374dbfbc1bacbc7389 (diff) | |
add env to modify tmpdir and globaldir
Diffstat (limited to 'xmake/core/base/global.lua')
| -rw-r--r-- | xmake/core/base/global.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/core/base/global.lua b/xmake/core/base/global.lua index f041c759d..9f8f5c08d 100644 --- a/xmake/core/base/global.lua +++ b/xmake/core/base/global.lua @@ -103,7 +103,10 @@ end -- get the global configure directory function global.directory() - return path.translate("~/.xmake") + if global._ROOTDIR == nil then + global._ROOTDIR = os.getenv("XMAKE_GLOBALDIR") or path.translate("~/.xmake") + end + return global._ROOTDIR end -- load the global configure |
