IDEA-CR-48413: GO-7539 fix env vars override

Don't use a pipe: bash unlike zhsh creates a subshell for the loop and
exported variables are gone after loop is
over (http://mywiki.wooledge.org/BashFAQ/024).

(cherry picked from commit c31048277888dbea1cf4a770820ded76e9bea176)

GitOrigin-RevId: 97f0ccce4f536c441b8c8e249d5bc051cfae8016
This commit is contained in:
Dmitry Neverov
2019-07-02 06:52:16 +03:00
committed by intellij-monorepo-bot
parent 58a22f282e
commit a004080710
+2 -2
View File
@@ -32,7 +32,7 @@ else
fi
function override_jb_variables {
env | while IFS="=" read NAME VALUE
while IFS="=" read NAME VALUE
do
if [[ $NAME = '_INTELLIJ_FORCE_SET_'* ]]
then
@@ -42,7 +42,7 @@ function override_jb_variables {
export "$NEW_NAME"="$VALUE"
fi
fi
done
done < <(env)
}
override_jb_variables