The portion of merge-target-branch.sh responsible for configuring the GitHub user does not quote its values. This means the values can be treated as multiple arguments. For example:
git log --format='%an' $CIRCLE_SHA1^! could return "John Q Doe".
- The outer command then becomes
git config --global user.name John Q Doe.
- Git rejects the command and the overall script fails, because there are too many arguments. "John Q" would technically complete successfully, although the global value of
user.name would actually be "John".
|
# setup the github user |
|
git config --global user.email $( git log --format='%ae' $CIRCLE_SHA1^! ) |
|
git config --global user.name $( git log --format='%an' $CIRCLE_SHA1^! ) |
The portion of merge-target-branch.sh responsible for configuring the GitHub user does not quote its values. This means the values can be treated as multiple arguments. For example:
git log --format='%an' $CIRCLE_SHA1^!could return "John Q Doe".git config --global user.name John Q Doe.user.namewould actually be "John".ci-scripts/merge-target-branch.sh
Lines 34 to 36 in 3c014de