diff options
| author | ruki <[email protected]> | 2020-06-20 21:02:36 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-06-20 21:02:36 +0800 |
| commit | 9952e551b93d71d5428dc99633fb770d8e0636f4 (patch) | |
| tree | dbd8651bd3a9b74418aa37b0ae0608f7aa0e961c | |
| parent | d3eb3f508142bdd29a243b469116a665cf929f3d (diff) | |
improve config cache
| -rw-r--r-- | xmake/actions/config/main.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/actions/config/main.lua b/xmake/actions/config/main.lua index f6b9e4b5b..627f70853 100644 --- a/xmake/actions/config/main.lua +++ b/xmake/actions/config/main.lua @@ -85,6 +85,14 @@ function _need_check(changed) end end + -- xmake has been updated? force to check config again + -- we need clean the dirty config cache of the old version + if not changed then + if os.mtime(path.join(os.programdir(), "core", "main.lua")) > os.mtime(config.filepath()) then + changed = true + end + end + -- update mtimes configcache:set("mtimes", mtimes) |
