Skip to content

Commit 49ca442

Browse files
CopilotBYK
andcommitted
Add exec_proxy_args variable and use it in dcx definition
Co-authored-by: BYK <[email protected]>
1 parent 343c441 commit 49ca442

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

install/dc-detect-version.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ else
4848
fi
4949

5050
proxy_args="--build-arg HTTP_PROXY=${HTTP_PROXY:-} --build-arg HTTPS_PROXY=${HTTPS_PROXY:-} --build-arg NO_PROXY=${NO_PROXY:-} --build-arg http_proxy=${http_proxy:-} --build-arg https_proxy=${https_proxy:-} --build-arg no_proxy=${no_proxy:-}"
51+
exec_proxy_args="-e HTTP_PROXY=${HTTP_PROXY:-} -e HTTPS_PROXY=${HTTPS_PROXY:-} -e NO_PROXY=${NO_PROXY:-} -e http_proxy=${http_proxy:-} -e https_proxy=${https_proxy:-} -e no_proxy=${no_proxy:-}"
5152
if [[ "$CONTAINER_ENGINE" == "podman" ]]; then
5253
proxy_args_dc="--podman-build-args HTTP_PROXY=${HTTP_PROXY:-},HTTPS_PROXY=${HTTPS_PROXY:-},NO_PROXY=${NO_PROXY:-},http_proxy=${http_proxy:-},https_proxy=${https_proxy:-},no_proxy=${no_proxy:-}"
5354
# Disable pod creation as these are one-off commands and creating a pod
@@ -60,7 +61,7 @@ else
6061
fi
6162
dcb="$dc build $proxy_args"
6263
dbuild="$CONTAINER_ENGINE build $proxy_args"
63-
dcx="$dc exec -e HTTP_PROXY=${HTTP_PROXY:-} -e HTTPS_PROXY=${HTTPS_PROXY:-} -e NO_PROXY=${NO_PROXY:-} -e http_proxy=${http_proxy:-} -e https_proxy=${https_proxy:-} -e no_proxy=${no_proxy:-}"
64+
dcx="$dc exec $exec_proxy_args"
6465
echo "$dcr"
6566
# Utility function to handle --wait with docker and podman
6667
function start_service_and_wait_ready() {

0 commit comments

Comments
 (0)