From 5769dba5932aad3a97c8db36c80a15064b71f556 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 31 May 2016 15:49:37 +0800 Subject: add history --- xmake/core/project/cache.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xmake/core/project/cache.lua') 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") .. "/")) -- cgit v1.3.1