From 8a5c227eab3562bb9d6adcba3d27a446e630f588 Mon Sep 17 00:00:00 2001 From: AlexKVal Date: Thu, 19 Nov 2015 09:32:00 +0200 Subject: [PATCH] [fixed] checking that a local repo is behind the remote --- src/release.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/release.js b/src/release.js index 79ea78b..32d35d4 100644 --- a/src/release.js +++ b/src/release.js @@ -214,7 +214,8 @@ function release({ type, preid, npmTagName }) { console.info('No pending changes'.cyan); // ensure git repo last version is fetched - if (/\[behind (.*)\]/.test(exec('git fetch').output)) { + exec('git fetch'); + if (/behind (.*)\]/.test(exec('git status -sb').output)) { printErrorAndExit(`Your repo is behind by ${RegExp.$1} commits`); } console.info('Current with latest changes from remote'.cyan);