Skip to content

Commit

Permalink
[Release Tooling] Stop sourcing .bash_profile when running generated …
Browse files Browse the repository at this point in the history
…shell scripts (#12159)
  • Loading branch information
ncooke3 authored Dec 27, 2023
1 parent 16ddaab commit 2a3fd2a
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions ReleaseTooling/Sources/Utils/ShellUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,9 @@ public extension Shell {
// Write the temporary script contents to the script's path. CocoaPods complains when LANG
// isn't set in the environment, so explicitly set it here. The `/usr/local/git/current/bin`
// is to allow the `sso` protocol if it's there.
// The user's .bash_profile, if it exists, is sourced to modify the
// shell's PATH with any configuration (e.g. adding Ruby to path)
// that may be needed to run the given command.
let contents = """
export PATH="/usr/local/bin:/usr/local/git/current/bin:$PATH"
export LANG="en_US.UTF-8"
BASH_PROFILE_PATH="~/.bash_profile"
if [ -f "$BASH_PROFILE_PATH" ]; then
source $BASH_PROFILE_PATH
fi
\(command)
"""
try contents.write(to: scriptPath, atomically: true, encoding: .utf8)
Expand Down

0 comments on commit 2a3fd2a

Please sign in to comment.