Blame SOURCES/installer-12736-no-sudo.patch

ebbf98
From f8e115fadf6e8b392fa007e78d9b77fc64590cdd Mon Sep 17 00:00:00 2001
ebbf98
From: Daniel Plaisted <dsplaisted@gmail.com>
ebbf98
Date: Mon, 29 Nov 2021 20:19:30 -0800
ebbf98
Subject: [PATCH] Don't set ulimit
ebbf98
ebbf98
1ES pools should now have ulimit set already now
ebbf98
---
ebbf98
 build.sh     | 4 +---
ebbf98
 run-build.sh | 4 ----
ebbf98
 2 files changed, 1 insertion(+), 7 deletions(-)
ebbf98
ebbf98
diff --git a/build.sh b/build.sh
ebbf98
index 594a355fafa..7ff647c4060 100755
ebbf98
--- a/build.sh
ebbf98
+++ b/build.sh
ebbf98
@@ -53,7 +53,5 @@ dockerbuild()
ebbf98
 if [ ! -z "$BUILD_IN_DOCKER" ]; then
ebbf98
     dockerbuild $args
ebbf98
 else
ebbf98
-    # Run under sudo so we can set ulimit
ebbf98
-    # See https://github.com/dotnet/core-eng/issues/14808
ebbf98
-    sudo -E $DIR/run-build.sh $args
ebbf98
+    $DIR/run-build.sh $args
ebbf98
 fi
ebbf98
diff --git a/run-build.sh b/run-build.sh
ebbf98
index fe839eb8009..7b98aedc0be 100755
ebbf98
--- a/run-build.sh
ebbf98
+++ b/run-build.sh
ebbf98
@@ -25,10 +25,6 @@ CUSTOM_BUILD_ARGS=
ebbf98
 # Set nuget package cache under the repo
ebbf98
 [ -z $NUGET_PACKAGES ] && export NUGET_PACKAGES="$REPOROOT/.nuget/packages"
ebbf98
 
ebbf98
-# Set max number of files open, helps avoid errors during NuGet restore
ebbf98
-# See https://github.com/dotnet/core-eng/issues/14808
ebbf98
-ulimit -n 16384
ebbf98
-
ebbf98
 args=( )
ebbf98
 
ebbf98
 while [[ $# > 0 ]]; do