mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
Revert "install-multi-user.sh
: _sudo
: add proxy variables to sudo"
This reverts commit 24fd7e2755
.
This commit is contained in:
parent
739f53aca4
commit
f175b3a4b7
1 changed files with 1 additions and 26 deletions
|
@ -58,31 +58,6 @@ readonly EXTRACTED_NIX_PATH="$(dirname "$0")"
|
|||
|
||||
readonly ROOT_HOME=~root
|
||||
|
||||
readonly PROXY_ENVIRONMENT_VARIABLES=(
|
||||
http_proxy
|
||||
https_proxy
|
||||
ftp_proxy
|
||||
no_proxy
|
||||
HTTP_PROXY
|
||||
HTTPS_PROXY
|
||||
FTP_PROXY
|
||||
NO_PROXY
|
||||
)
|
||||
|
||||
SUDO_EXTRA_ENVIRONMENT_VARIABLES=()
|
||||
|
||||
setup_sudo_extra_environment_variables() {
|
||||
local i=${#SUDO_EXTRA_ENVIRONMENT_VARIABLES[@]}
|
||||
for variable in "${PROXY_ENVIRONMENT_VARIABLES[@]}"; do
|
||||
if [ "x${!variable:-}" != "x" ]; then
|
||||
SUDO_EXTRA_ENVIRONMENT_VARIABLES[i]="$variable=${!variable}"
|
||||
i=$((i + 1))
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
setup_sudo_extra_environment_variables
|
||||
|
||||
if [ -t 0 ] && [ -z "${NIX_INSTALLER_YES:-}" ]; then
|
||||
readonly IS_HEADLESS='no'
|
||||
else
|
||||
|
@ -386,7 +361,7 @@ _sudo() {
|
|||
if is_root; then
|
||||
env "$@"
|
||||
else
|
||||
sudo "${SUDO_EXTRA_ENVIRONMENT_VARIABLES[@]}" "$@"
|
||||
sudo "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue