Skip to content

Commit

Permalink
Update deployer.js
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahDragon authored Dec 8, 2016
1 parent df26bc2 commit 1e14594
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/deployer.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module.exports = function(args) {
var log = this.log;
var message = commitMessage(args);
var verbose = !args.silent;
var force = args.force_push || true;

if (!args.repo && process.env.HEXO_DEPLOYER_REPO) {
args.repo = process.env.HEXO_DEPLOYER_REPO;
Expand Down Expand Up @@ -84,7 +85,7 @@ module.exports = function(args) {
// Do nothing. It's OK if nothing to commit.
});
}).then(function() {
return git('push', '-u', repo.url, 'HEAD:' + repo.branch, '--force');
return git('push', '-u', repo.url, 'HEAD:' + repo.branch, (force ? '--force' : ''));
});
}

Expand Down

0 comments on commit 1e14594

Please sign in to comment.