summaryrefslogtreecommitdiff
path: root/xmake/modules/private
diff options
context:
space:
mode:
authorxq114 <[email protected]>2021-11-06 15:30:38 +0800
committerxq114 <[email protected]>2021-11-06 15:30:38 +0800
commit2ed6222d854d03441d24314595cae550b4b842e0 (patch)
tree7f70ab2b7bcb21efbd9e857553265978e5aa3142 /xmake/modules/private
parent95dea5af25edb9f1eda15ad8412342e26ef39525 (diff)
improve env config
Diffstat (limited to 'xmake/modules/private')
-rw-r--r--xmake/modules/private/xrepo/action/env.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/modules/private/xrepo/action/env.lua b/xmake/modules/private/xrepo/action/env.lua
index 18b59c0e6..07709b7bd 100644
--- a/xmake/modules/private/xrepo/action/env.lua
+++ b/xmake/modules/private/xrepo/action/env.lua
@@ -381,7 +381,13 @@ function info(key, bnd)
elseif key == "envfile" then
print(os.tmpfile())
elseif key == "config" then
- if not bnd and os.isfile(os.projectfile()) then
+ local boundenv = _get_boundenv({bind = bnd})
+ local has_envfile = (boundenv and os.isfile(boundenv)) and true or false
+ if has_envfile or os.isfile(os.projectfile()) then
+ if has_envfile then
+ _enter_project({enteronly = true})
+ table.insert(project.rcfiles(), boundenv)
+ end
task.run("config", {target = "all"}, {disable_dump = true})
end
elseif key:startswith("script.") then