diff options
| author | ruki <[email protected]> | 2020-06-23 22:52:21 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-06-23 11:14:09 +0800 |
| commit | 873b532f381d4dddabe5370dcffef49816f9f808 (patch) | |
| tree | 48c1296414ba9eb0b3ec9e74bbd54d471c841910 /xmake/modules/devel/git/pull.lua | |
| parent | 1b43e9cd4f5a38025478ade0de3f044d7b1e9ee7 (diff) | |
add global proxy settings
Diffstat (limited to 'xmake/modules/devel/git/pull.lua')
| -rw-r--r-- | xmake/modules/devel/git/pull.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xmake/modules/devel/git/pull.lua b/xmake/modules/devel/git/pull.lua index 7eba74114..6e0f0a735 100644 --- a/xmake/modules/devel/git/pull.lua +++ b/xmake/modules/devel/git/pull.lua @@ -20,6 +20,7 @@ -- imports import("core.base.option") +import("core.base.global") import("lib.detect.find_tool") -- pull remote commits @@ -63,8 +64,15 @@ function main(opt) oldir = os.cd(opt.repodir) end + -- use proxy? + local envs + local proxy = global.get("proxy") + if proxy then + envs = {ALL_PROXY = proxy} + end + -- pull it - os.vrunv(git.program, argv) + os.vrunv(git.program, argv, {envs = envs}) -- leave repository directory if oldir then |
