diff options
| author | OpportunityLiu <[email protected]> | 2019-07-11 13:49:22 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-07-11 13:49:22 +0800 |
| commit | 695a634afebe0855d6aea84001dba8a0faffbbf4 (patch) | |
| tree | 45ff3ac31fa6b5b7e730ec5900ed70faca8549a5 | |
| parent | 784f2fb015f748cd381fb5a8a2098d7a7255ac74 (diff) | |
fix regex
| -rw-r--r-- | xmake/core/sandbox/modules/import/lib/detect/find_file.lua | 2 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/import/lib/detect/find_program.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/sdks/find_cuda.lua | 2 |
3 files changed, 3 insertions, 3 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 2d64d6067..869c3d540 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("^%$%(%s*env%s+%S+%s*%)$") 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 bfc21f35c..fe9d73322 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("^%$%(%s*env%s+%S+%s*%)$") then _path = path.splitenv(vformat(_path)) else _path = vformat(_path) diff --git a/xmake/modules/detect/sdks/find_cuda.lua b/xmake/modules/detect/sdks/find_cuda.lua index 87ac6f3a1..54b8f21cf 100644 --- a/xmake/modules/detect/sdks/find_cuda.lua +++ b/xmake/modules/detect/sdks/find_cuda.lua @@ -40,7 +40,7 @@ function _find_sdkdir() table.insert(pathes, "/usr/local/cuda/bin") table.insert(pathes, "/usr/local/cuda*/bin") end - table.join2(pathes, path.splitenv(os.getenv("PATH"))) + table.insert(pathes, "$(env PATH)") -- attempt to find nvcc local nvcc = find_file(os.host() == "windows" and "nvcc.exe" or "nvcc", pathes) |
