summaryrefslogtreecommitdiff
path: root/xmake/core/project/cache.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-05-31 15:49:37 +0800
committerruki <[email protected]>2016-05-31 15:49:37 +0800
commit5769dba5932aad3a97c8db36c80a15064b71f556 (patch)
treecd08ffc12af5dc735fd1714adcaa2657e4b0f730 /xmake/core/project/cache.lua
parent2258b6be79c6b07a197ca27f79c89baaf8fd3779 (diff)
add history
Diffstat (limited to 'xmake/core/project/cache.lua')
-rw-r--r--xmake/core/project/cache.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/core/project/cache.lua b/xmake/core/project/cache.lua
index 5ea212dfc..1a81ee4dc 100644
--- a/xmake/core/project/cache.lua
+++ b/xmake/core/project/cache.lua
@@ -54,6 +54,11 @@ function cache._instance(scopename)
-- init instance
local instance = table.inherit(cache)
+ -- check scopename
+ if not scopename:find("local%.") and not scopename:find("global%.") then
+ os.raise("invalid cache scope: %s", scopename)
+ end
+
-- make the cache path
local cachepath = (scopename:gsub("%.", "/"))
cachepath = (cachepath:gsub("^local%/", path.join(config.directory(), "cache") .. "/"))