Skip to content

Commit 6891466

Browse files
sephalona-nogikh
authored andcommitted
tools/syz-env: consider HTTP proxy environment variables
In extension of commit 326f9c5 ("tools/syz-env: export https_proxy to docker in case behind proxy"), cover further HTTP proxy environment variables and the Docker build process.
1 parent ae18d35 commit 6891466

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

tools/syz-env

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,21 @@
2525
# (Googlers see go/docker).
2626

2727
COMMAND=""
28+
BUILDARGS=()
2829
DOCKERARGS=()
29-
[ -n $https_proxy ] && DOCKERARGS+=" --env https_proxy=$https_proxy"
30+
if [ -n $http_proxy ]; then
31+
BUILDARGS+=" --build-arg http_proxy=$http_proxy"
32+
DOCKERARGS+=" --env http_proxy=$http_proxy"
33+
fi
34+
if [ -n $https_proxy ]; then
35+
BUILDARGS+=" --build-arg https_proxy=$https_proxy"
36+
DOCKERARGS+=" --env https_proxy=$https_proxy"
37+
fi
38+
if [ -n $no_proxy ]; then
39+
BUILDARGS+=" --build-arg no_proxy=$no_proxy"
40+
DOCKERARGS+=" --env no_proxy=$no_proxy"
41+
fi
42+
3043
for ARG in "$@"; do
3144
while IFS='=' read KEY VAL; do
3245
# If we have a kernel path passed in, we mount it in the container

0 commit comments

Comments
 (0)