diff --git a/tools/jenkins/run_distribution.sh b/tools/jenkins/run_distribution.sh
index cb564fba1ac63af7af6eba9d3bfbe9feb6cd6298..2824c31e2aa65081f3fee229d73d7380256cc672 100755
--- a/tools/jenkins/run_distribution.sh
+++ b/tools/jenkins/run_distribution.sh
@@ -85,8 +85,8 @@ elif [ "$platform" == "macos" ]; then
     # i.e. curl -fsSL https://goo.gl/getgrpc | bash -s $language
     # need to resolve a bunch of environment and privilege issue on the jenkins
     # mac machine itself
-    local OLD_PATH=$PATH
-    local PATH=$brew_root/bin:$PATH
+    OLD_PATH=$PATH
+    PATH=$brew_root/bin:$PATH
     cd $brew_root
     brew tap homebrew/dupes
     brew install zlib
@@ -139,7 +139,7 @@ elif [ "$platform" == "macos" ]; then
     rm -rf $brew_root
 
     # Make sure the system brew installation is still unaffected
-    local PATH=$OLD_PATH
+    PATH=$OLD_PATH
     brew list -l
 
   else