dojo / grunt-dojo2-extras

Grunt tasks and code supporting continuous delivery across projects. Deploys to gh-pages and latest branch.
https://dojo.github.io/grunt-dojo2-extras/
Other
0 stars 6 forks source link

Default grunt task overwrites git configuration #22

Closed devpaul closed 7 years ago

devpaul commented 7 years ago

FROM dojo/dojo.io#98

The README.md file states, in the Quick Start section, that the proper way to deploy the site locally includes, amongst other things, running the default grunt task. When this task is run, however, the global git configuration file is changed. The user.email setting is overwritten to support@sitepen.com and a new user.name field is added with the value "Travis". These changes are not reverted when the grunt task is completed so the users configuration is left in a corrupted state.

devpaul commented 7 years ago

This happens because of the sync task calling Git#ensureConfig(). I think Git#hasConfig() isn't returning the correct value so user.name and user.email are always set.

https://github.com/dojo/grunt-dojo2-extras/blob/cdcb95efd6379f8093639480f8347d7e8c80fdfd/src/util/Git.ts#L74-L81