summaryrefslogtreecommitdiff
path: root/xmake/core/base/path.lua
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-07-18 18:18:58 +0800
committerOpportunityLiu <[email protected]>2019-07-19 11:48:33 +0800
commita8cc8e8989fd52574088200c5d6bbc3a4582d911 (patch)
tree1f437f64fddee3bda885b656f15ae0909f0cdf5e /xmake/core/base/path.lua
parent8ef441ef5507b58e024c55e3f1d6b80284bef4d6 (diff)
fix
Diffstat (limited to 'xmake/core/base/path.lua')
-rw-r--r--xmake/core/base/path.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/xmake/core/base/path.lua b/xmake/core/base/path.lua
index d15c42fc4..8b35a771c 100644
--- a/xmake/core/base/path.lua
+++ b/xmake/core/base/path.lua
@@ -163,10 +163,11 @@ end
function path.joinenv(env_table)
-- check
- env_table = env_table or {}
+ if not env_table or #env_table == 0 then
+ return ""
+ end
local envsep = path.envsep()
-
if xmake._HOST == "windows" then
local tab = {}
for _, v in ipairs(env_table) do
@@ -181,8 +182,6 @@ function path.joinenv(env_table)
else
return table.concat(env_table, envsep)
end
-
- return result
end
-- the last character is the path seperator?