Skip to content

Commit

Permalink
fix: Write whether file exists or not
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoslin authored and vojtajina committed Jul 9, 2013
1 parent 8bcd7a3 commit a2f663c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tasks/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ module.exports = function (grunt) {

// generate changelog
changelog.generate(githubRepo, 'v' + newVersion).then(function(data) {
grunt.file.write(options.dest, data + grunt.file.read(options.dest));
var currentLog = grunt.file.exists(options.dest) ? grunt.file.read(options.dest) : '';
grunt.file.write(options.dest, data + currentLog);

if (options.editor) {
exec(options.editor + ' ' + options.dest, function(err) {
Expand Down

0 comments on commit a2f663c

Please sign in to comment.