summaryrefslogtreecommitdiff
path: root/xmake/modules/detect/sdks/find_xcode.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-12-13 00:39:22 +0800
committerruki <[email protected]>2018-12-12 22:35:17 +0800
commita16fcd5180de7d18426106e5d398ebc04a96841d (patch)
treeebffa6df08a28820f54a047b9b457c13c8bb8a32 /xmake/modules/detect/sdks/find_xcode.lua
parentfd4ca8751a6d64de8088a05e6f0a8ac4e6e48d2d (diff)
improve to xmake global
Diffstat (limited to 'xmake/modules/detect/sdks/find_xcode.lua')
-rw-r--r--xmake/modules/detect/sdks/find_xcode.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/detect/sdks/find_xcode.lua b/xmake/modules/detect/sdks/find_xcode.lua
index 0a71f0d84..3d381f665 100644
--- a/xmake/modules/detect/sdks/find_xcode.lua
+++ b/xmake/modules/detect/sdks/find_xcode.lua
@@ -106,9 +106,9 @@ function main(sdkdir, opt)
opt = opt or {}
-- attempt to load cache first
- local key = "detect.sdks.find_vscode." .. (sdkdir or "")
+ local key = "detect.sdks.find_vscode"
local cacheinfo = cache.load(key)
- if not opt.force and cacheinfo.xcode then
+ if not opt.force and cacheinfo.xcode and cacheinfo.xcode.sdkdir and os.isdir(cacheinfo.xcode.sdkdir) then
return cacheinfo.xcode
end