fix: do not log outated branch error for missing permission cases
This commit is contained in:
+2
-4
@@ -177,11 +177,9 @@ async function verifyTagName(tagName, execaOpts) {
|
||||
* @return {Boolean} `true` is the HEAD of the current local branch is the same as the HEAD of the remote branch, falsy otherwise.
|
||||
*/
|
||||
async function isBranchUpToDate(branch, execaOpts) {
|
||||
const remoteHead = await execa.stdout('git', ['ls-remote', '--heads', 'origin', branch], execaOpts);
|
||||
try {
|
||||
return await isRefInHistory(
|
||||
(await execa.stdout('git', ['ls-remote', '--heads', 'origin', branch], execaOpts)).match(/^(\w+)?/)[1],
|
||||
execaOpts
|
||||
);
|
||||
return await isRefInHistory(remoteHead.match(/^(\w+)?/)[1], execaOpts);
|
||||
} catch (error) {
|
||||
debug(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user