Skip to content

Commit 8a5c227

Browse files
committed
[fixed] checking that a local repo is behind the remote
1 parent 11cfe43 commit 8a5c227

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/release.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ function release({ type, preid, npmTagName }) {
214214
console.info('No pending changes'.cyan);
215215

216216
// ensure git repo last version is fetched
217-
if (/\[behind (.*)\]/.test(exec('git fetch').output)) {
217+
exec('git fetch');
218+
if (/behind (.*)\]/.test(exec('git status -sb').output)) {
218219
printErrorAndExit(`Your repo is behind by ${RegExp.$1} commits`);
219220
}
220221
console.info('Current with latest changes from remote'.cyan);

0 commit comments

Comments
 (0)