Skip to content

Commit

Permalink
Revert "Allow env.sh to accept additional env var names (#3339)" (#4143)
Browse files Browse the repository at this point in the history
This reverts commit 27e3d4e.
  • Loading branch information
KonstantinTyukalov authored and ivanduplenskikh committed Nov 8, 2023
1 parent 3c37690 commit 086f29a
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions src/Misc/layoutroot/env.sh
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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
Expand All @@ -44,7 +34,7 @@ function writeVar()
if [ ! -z "${!checkVar}" ]; then
echo "${checkVar}=${!checkVar}">>.env
fi
fi
fi
}

echo $PATH>.path
Expand Down

0 comments on commit 086f29a

Please sign in to comment.