diff options
| author | ruki <[email protected]> | 2019-11-19 00:46:07 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-11-18 22:36:46 +0800 |
| commit | 299862deb370f5b9df641dfa5a4fc7d20923a042 (patch) | |
| tree | bf6eb30e8c9aff932bb2e0a1524f12f29062aa4c /xmake/core/project/project.lua | |
| parent | cf984b4a0e9e4ea733f2c35deca3b714baa2a227 (diff) | |
improve xmakerc file
Diffstat (limited to 'xmake/core/project/project.lua')
| -rw-r--r-- | xmake/core/project/project.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua index 0a6451b80..300f84278 100644 --- a/xmake/core/project/project.lua +++ b/xmake/core/project/project.lua @@ -295,7 +295,13 @@ end function project.rcfile() local xmakerc = project._XMAKE_RCFILE if xmakerc == nil then - xmakerc = os.getenv("XMAKE_RCFILE") or "~/.xmakerc.lua" + xmakerc = "/etc/xmakerc.lua" + if not os.isfile(xmakerc) then + xmakerc = "~/.xmakerc.lua" + if not os.isfile(xmakerc) then + xmakerc = path.join(global.directory(), "xmakerc.lua") + end + end project._XMAKE_RCFILE = xmakerc end return xmakerc |
