Skip to content

Commit febc95c

Browse files
chore: change failed push behavior
BREAKING CHANGE: throws error if failed to push
1 parent 8b4c701 commit febc95c

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

__tests__/git-helper.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ describe('GitHelper', () => {
653653
await helper.push(workDir, 'test-branch', context(), {withTag: true, args: ['--prune', '--verbose']});
654654

655655
execCalledWith(mockExec, [
656-
'git push --tags --prune --verbose \'https://octocat:[email protected]/hello/world.git\' \'test-branch:refs/heads/test-branch\' || :',
656+
'git push --tags --prune --verbose \'https://octocat:[email protected]/hello/world.git\' \'test-branch:refs/heads/test-branch\'',
657657
]);
658658
});
659659

@@ -663,7 +663,7 @@ describe('GitHelper', () => {
663663
await helper.push(workDir, 'test-branch', context());
664664

665665
execCalledWith(mockExec, [
666-
'git push \'https://octocat:[email protected]/hello/world.git\' \'test-branch:refs/heads/test-branch\' || :',
666+
'git push \'https://octocat:[email protected]/hello/world.git\' \'test-branch:refs/heads/test-branch\'',
667667
]);
668668
});
669669
});
@@ -675,7 +675,7 @@ describe('GitHelper', () => {
675675
await helper.forcePush(workDir, 'test-branch', context());
676676

677677
execCalledWith(mockExec, [
678-
'git push --force \'https://octocat:[email protected]/hello/world.git\' \'test-branch:refs/heads/test-branch\' || :',
678+
'git push --force \'https://octocat:[email protected]/hello/world.git\' \'test-branch:refs/heads/test-branch\'',
679679
]);
680680
});
681681
});

src/git-helper.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,6 @@ export default class GitHelper {
563563
args: args.concat([this.getRemote(context), `${branch}:refs/heads/${branch}`]),
564564
stderrToStdout: this.isQuiet(),
565565
altCommand: `git push ${args.concat([this.getRemoteName(), `${branch}:refs/heads/${branch}`]).join(' ')}`,
566-
suppressError: this.shouldSuppressError(),
567566
});
568567
};
569568

0 commit comments

Comments
 (0)