From a00408071087692bc6d3a69e666dacb95a3ce338 Mon Sep 17 00:00:00 2001 From: Dmitry Neverov Date: Fri, 14 Jun 2019 14:00:13 +0200 Subject: [PATCH] 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 --- plugins/terminal/resources/jediterm-bash.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/terminal/resources/jediterm-bash.in b/plugins/terminal/resources/jediterm-bash.in index 95e367212cdb..c1e74eba12a6 100644 --- a/plugins/terminal/resources/jediterm-bash.in +++ b/plugins/terminal/resources/jediterm-bash.in @@ -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