From 4b66e90b310f70ca36005785cd2764b8baa6c97e Mon Sep 17 00:00:00 2001 From: Konstantin Tyukalov <52399739+KonstantinTyukalov@users.noreply.github.com> Date: Thu, 2 Feb 2023 14:40:45 +0400 Subject: [PATCH] Revert "Allow env.sh to accept additional env var names (#3339)" (#4143) This reverts commit 27e3d4e177e83aac805bf93c38233fa1a9f06101. --- src/Misc/layoutroot/env.sh | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/src/Misc/layoutroot/env.sh b/src/Misc/layoutroot/env.sh index 92b597f4f6..0bf710038e 100755 --- a/src/Misc/layoutroot/env.sh +++ b/src/Misc/layoutroot/env.sh @@ -1,13 +1,13 @@ #!/bin/bash varCheckList=( - 'LANG' - 'JAVA_HOME' - 'ANT_HOME' - 'M2_HOME' - 'ANDROID_HOME' - 'GRADLE_HOME' - 'NVM_BIN' + 'LANG' + 'JAVA_HOME' + 'ANT_HOME' + 'M2_HOME' + 'ANDROID_HOME' + 'GRADLE_HOME' + 'NVM_BIN' 'NVM_PATH' 'VSTS_HTTP_PROXY' 'VSTS_HTTP_PROXY_USERNAME' @@ -17,16 +17,6 @@ varCheckList=( 'AGENT_TOOLSDIRECTORY' ) -# Allows the caller to specify additional vars on the commandline, for example: -# ./env.sh DOTNET_SYSTEM_GLOBALIZATION_INVARIANT DOTNET_ROOT -for arg in "$@" -do - if [[ ! " ${varCheckList[@]} " =~ " ${arg} " ]]; then - varCheckList+=($arg) - fi -done - - envContents="" if [ -f ".env" ]; then @@ -44,7 +34,7 @@ function writeVar() if [ ! -z "${!checkVar}" ]; then echo "${checkVar}=${!checkVar}">>.env fi - fi + fi } echo $PATH>.path