dojo/grunt-dojo2-extras

Default grunt task overwrites git configuration

Closed this issue · 1 comments

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.

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.

async ensureConfig(user: string = 'Travis CI', email: string = 'support@sitepen.com') {
if (!(await this.hasConfig('user.name'))) {
await this.setConfig('user.name', user);
}
if (!(await this.hasConfig('user.email'))) {
await this.setConfig('user.email', email);
}
}