summaryrefslogtreecommitdiff
path: root/xmake/core/project/cache.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-01-04 22:51:39 +0800
committerruki <[email protected]>2019-01-04 11:09:58 +0800
commit76cf129b49dba3abd63de5610900265c63603458 (patch)
treec88b20b6a4ab9dfc980e8c2d353059787281fce1 /xmake/core/project/cache.lua
parenta5d9cb41fef552951bec41ba5f8c4261953f6bd5 (diff)
improve project and history cache
Diffstat (limited to 'xmake/core/project/cache.lua')
-rw-r--r--xmake/core/project/cache.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/xmake/core/project/cache.lua b/xmake/core/project/cache.lua
index 558acb64d..2394b605c 100644
--- a/xmake/core/project/cache.lua
+++ b/xmake/core/project/cache.lua
@@ -119,11 +119,14 @@ function cache:flush()
-- memory cache? ignore it directly
if not self._CACHEPATH then
- return true
+ return
end
-- save to file
- return io.save(self._CACHEPATH, self._CACHEDATA)
+ local ok, errors = io.save(self._CACHEPATH, self._CACHEDATA)
+ if not ok then
+ os.raise(errors)
+ end
end
-- return module