...
1# Sanitize the environment a bit.
2unexport ENV # bad configuration mechanism
3unexport BASH_ENV # bad configuration mechanism, but CircleCI insists on it
4unexport CDPATH # should not be exported, but some people do
5unexport IFS # should not be exported, but some people do
6
7# In the days before Bash 2.05 (April 2001), Bash had a hack in it
8# where it would load the interactive-shell configuration when run
9# from sshd, I guess to work around buggy sshd implementations that
10# didn't run the shell as login or interactive or something like that.
11# But that hack was removed in Bash 2.05 in 2001. And the changelog
12# indicates that the heuristics it used to decide whether to do that
13# were buggy to begin with, and it would often trigger when it
14# shouldn't. BUT DEBIAN PATCHES BASH TO ADD THAT HACK BACK IN! And,
15# more importantly, Ubuntu 20.04 (which our CircleCI uses) inherits
16# that patch from Debian. And the heuristic that Bash uses
17# incorrectly triggers inside of Make in our CircleCI jobs! So, unset
18# SSH_CLIENT and SSH2_CLIENT to disable that.
19unexport SSH_CLIENT
20unexport SSH2_CLIENT
View as plain text