From: Yulong Pei Date: Sun, 28 Jul 2019 20:08:04 +0000 (+0800) Subject: make sudo to preserve user existing environment variables X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=commitdiff_plain;h=0e853acbf246dde97bf8b376cffca1aefdf1aa7b make sudo to preserve user existing environment variables Change-Id: I83470b059b9ca59bb3725f1ebef6718adf8f91ae Signed-off-by: Yulong Pei --- 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.