Skip to content
Snippets Groups Projects
Unverified Commit 453f936d authored by Rhys Arkins's avatar Rhys Arkins Committed by GitHub
Browse files

fix(gitFs): throw if remote branch missing (#2664)

parent a64507ac
No related branches found
No related tags found
No related merge requests found
...@@ -193,12 +193,13 @@ class Storage { ...@@ -193,12 +193,13 @@ class Storage {
try { try {
await git.raw(['push', '--delete', 'origin', branchName]); await git.raw(['push', '--delete', 'origin', branchName]);
} catch (err) /* istanbul ignore next */ { } catch (err) /* istanbul ignore next */ {
logger.warn({ branchName, err }, 'Error deleting remote branch'); logger.info({ branchName, err }, 'Error deleting remote branch');
throw new Error('repository-changed');
} }
try { try {
await deleteLocalBranch(branchName); await deleteLocalBranch(branchName);
} catch (ex) { } catch (err) {
logger.debug({ branchName }, 'Could not delete remote branch'); logger.debug({ branchName, err }, 'Could not delete local branch');
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment