Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release Tooling] Stop sourcing .bash_profile when running generated shell scripts #12159

Merged
merged 3 commits into from
Dec 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading