File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
ReleaseTooling/Sources/Utils Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -62,10 +62,16 @@ public extension Shell {
62
62
// Write the temporary script contents to the script's path. CocoaPods complains when LANG
63
63
// isn't set in the environment, so explicitly set it here. The `/usr/local/git/current/bin`
64
64
// 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.
65
68
let contents = """
66
69
export PATH= " /usr/local/bin:/usr/local/git/current/bin:$PATH "
67
70
export LANG= " en_US.UTF-8 "
68
- source ~/.bash_profile
71
+ BASH_PROFILE_PATH= " ~/.bash_profile "
72
+ if [ -f " $BASH_PROFILE_PATH " ]; then
73
+ source $BASH_PROFILE_PATH
74
+ fi
69
75
\( command)
70
76
"""
71
77
try contents. write ( to: scriptPath, atomically: true , encoding: . utf8)
You can’t perform that action at this time.
0 commit comments