summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-07-11 14:41:17 +0800
committerOpportunityLiu <[email protected]>2019-07-11 14:41:17 +0800
commitb11c6f57662624732501045e6cccf6b6188dacee (patch)
tree31f3c0c1a5a26d3fafb0d65fae89ce2ca45c61c6
parent695a634afebe0855d6aea84001dba8a0faffbbf4 (diff)
fix regex
-rw-r--r--xmake/core/sandbox/modules/import/lib/detect/find_file.lua2
-rw-r--r--xmake/core/sandbox/modules/import/lib/detect/find_program.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_file.lua b/xmake/core/sandbox/modules/import/lib/detect/find_file.lua
index 869c3d540..45a3ebd8a 100644
--- a/xmake/core/sandbox/modules/import/lib/detect/find_file.lua
+++ b/xmake/core/sandbox/modules/import/lib/detect/find_file.lua
@@ -82,7 +82,7 @@ function sandbox_lib_detect_find_file.main(name, pathes, opt)
raise(results)
end
elseif type(_path) == "string" then
- if _path:match("^%$%(%s*env%s+%S+%s*%)$") then
+ if _path:match("^%$%(env .+%)$") then
_path = path.splitenv(vformat(_path))
else
_path = vformat(_path)
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua
index fe9d73322..f8a62ceaf 100644
--- a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua
+++ b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua
@@ -91,7 +91,7 @@ function sandbox_lib_detect_find_program._find_from_pathes(name, pathes, opt)
raise(results)
end
elseif type(_path) == "string" then
- if _path:match("^%$%(%s*env%s+%S+%s*%)$") then
+ if _path:match("^%$%(env .+%)$") then
_path = path.splitenv(vformat(_path))
else
_path = vformat(_path)