Skip to content

Commit 2a3fd2a

Browse files
authored
[Release Tooling] Stop sourcing .bash_profile when running generated shell scripts (#12159)
1 parent 16ddaab commit 2a3fd2a

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

ReleaseTooling/Sources/Utils/ShellUtils.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,9 @@ public extension Shell {
6262
// Write the temporary script contents to the script's path. CocoaPods complains when LANG
6363
// isn't set in the environment, so explicitly set it here. The `/usr/local/git/current/bin`
6464
// is to allow the `sso` protocol if it's there.
65-
// The user's .bash_profile, if it exists, is sourced to modify the
66-
// shell's PATH with any configuration (e.g. adding Ruby to path)
67-
// that may be needed to run the given command.
6865
let contents = """
6966
export PATH="/usr/local/bin:/usr/local/git/current/bin:$PATH"
7067
export LANG="en_US.UTF-8"
71-
BASH_PROFILE_PATH="~/.bash_profile"
72-
if [ -f "$BASH_PROFILE_PATH" ]; then
73-
source $BASH_PROFILE_PATH
74-
fi
7568
\(command)
7669
"""
7770
try contents.write(to: scriptPath, atomically: true, encoding: .utf8)

0 commit comments

Comments
 (0)