@@ -58,9 +58,13 @@ main() {
58
58
git merge upstream/master
59
59
60
60
echo " Pushing changes to cdrci/homebrew-core fork on GitHub"
61
+
62
+ # GIT_ASKPASS lets us use the password when pushing without revealing it in the process list
63
+ # See: https://serverfault.com/a/912788
64
+ GIT_ASKPASS=" $HOME /git-askpass.sh"
61
65
# Source: https://serverfault.com/a/912788
62
66
# shellcheck disable=SC2016,SC2028
63
- echo ' #!/bin/sh\nexec echo "$HOMEBREW_GITHUB_API_TOKEN"' > " $HOME " /git-askpass.sh
67
+ echo ' #!/bin/sh\nexec echo "$HOMEBREW_GITHUB_API_TOKEN"' > " $GIT_ASKPASS "
64
68
65
69
# Make sure the git-askpass.sh file creation is successful
66
70
if [[ $( file_exists " git-askpass.sh" ) -eq 1 ]]; then
@@ -70,18 +74,16 @@ main() {
70
74
fi
71
75
72
76
# Ensure it's executable since we just created it
73
- chmod +x " $HOME /git-askpass.sh "
77
+ chmod +x " $GIT_ASKPASS "
74
78
75
79
# Make sure the git-askpass.sh file is executable
76
- if [[ $( is_executable " $HOME /git-askpass.sh " ) -eq 1 ]]; then
80
+ if [[ $( is_executable " $GIT_ASKPASS " ) -eq 1 ]]; then
77
81
echo " git-askpass.sh is not executable."
78
- ls -la " $HOME /git-askpass.sh "
82
+ ls -la " $GIT_ASKPASS "
79
83
exit 1
80
84
fi
81
85
82
- # GIT_ASKPASS lets us use the password when pushing without revealing it in the process list
83
- # See: https://serverfault.com/a/912788
84
- GIT_ASKPASS=
" $HOME /git-askpass.sh" git push https://
[email protected] /cdr-oss/homebrew-core.git --all
86
+ git push https://
[email protected] /cdr-oss/homebrew-core.git --all
85
87
86
88
# Find the docs for bump-formula-pr here
87
89
# https://github.com/Homebrew/brew/blob/master/Library/Homebrew/dev-cmd/bump-formula-pr.rb#L18
0 commit comments