From 0e853acbf246dde97bf8b376cffca1aefdf1aa7b Mon Sep 17 00:00:00 2001 From: Yulong Pei Date: Mon, 29 Jul 2019 04:08:04 +0800 Subject: [PATCH] make sudo to preserve user existing environment variables Change-Id: I83470b059b9ca59bb3725f1ebef6718adf8f91ae Signed-off-by: Yulong Pei --- resources/libraries/bash/function/artifacts.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/libraries/bash/function/artifacts.sh b/resources/libraries/bash/function/artifacts.sh index fe755af9d9..35fade98af 100644 --- a/resources/libraries/bash/function/artifacts.sh +++ b/resources/libraries/bash/function/artifacts.sh @@ -67,7 +67,7 @@ function download_ubuntu_artifacts () { set -exuo pipefail - curl -s "${REPO_URL}"/script.deb.sh | sudo bash || { + curl -s "${REPO_URL}"/script.deb.sh | sudo -E bash || { die "Packagecloud FD.io repo fetch failed." } # If version is set we will add suffix. @@ -142,7 +142,7 @@ function download_centos_artifacts () { set -exuo pipefail - curl -s "${REPO_URL}"/script.rpm.sh | sudo bash || { + curl -s "${REPO_URL}"/script.rpm.sh | sudo -E bash || { die "Packagecloud FD.io repo fetch failed." } # If version is set we will add suffix. @@ -177,7 +177,7 @@ function download_opensuse_artifacts () { set -exuo pipefail - curl -s "${REPO_URL}"/script.rpm.sh | sudo bash || { + curl -s "${REPO_URL}"/script.rpm.sh | sudo -E bash || { die "Packagecloud FD.io repo fetch failed." } # If version is set we will add suffix. -- 2.16.6