bash: narrow the scope of GHOSTTY_BASH_ENV (#4690)
GHOSTTY_BASH_ENV is only set in the '--posix' path. This change is a code organization improvement and doesn't change the script's behavior.pull/4742/head
commit
1cf1b886cd
|
|
@ -24,6 +24,7 @@ if [ -n "$GHOSTTY_BASH_INJECT" ]; then
|
||||||
builtin source "$GHOSTTY_BASH_ENV"
|
builtin source "$GHOSTTY_BASH_ENV"
|
||||||
builtin export ENV="$GHOSTTY_BASH_ENV"
|
builtin export ENV="$GHOSTTY_BASH_ENV"
|
||||||
fi
|
fi
|
||||||
|
builtin unset GHOSTTY_BASH_ENV
|
||||||
else
|
else
|
||||||
# Restore bash's default 'posix' behavior. Also reset 'inherit_errexit',
|
# Restore bash's default 'posix' behavior. Also reset 'inherit_errexit',
|
||||||
# which doesn't happen as part of the 'posix' reset.
|
# which doesn't happen as part of the 'posix' reset.
|
||||||
|
|
@ -64,7 +65,7 @@ if [ -n "$GHOSTTY_BASH_INJECT" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
builtin unset GHOSTTY_BASH_ENV GHOSTTY_BASH_RCFILE
|
builtin unset GHOSTTY_BASH_RCFILE
|
||||||
builtin unset ghostty_bash_inject rcfile
|
builtin unset ghostty_bash_inject rcfile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue