Skip to content

Commit c74fc18

Browse files
committed
Merge branch 'master' of github.com:bomanimc/gitrocket
2 parents f0cfbfb + df4a1a1 commit c74fc18

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/GitRocketTerminal.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ import { Rocket, RocketSpan, FinTop, FinBottom, Fire, Wastes } from './styledEle
77
// This function performs regex matching on expected shell output for git push result being input
88
// at the command line. Currently it supports output from bash, zsh, fish, cmd and powershell.
99
function detectPushCommand(data) {
10-
const patterns = [
11-
'To(.+)\.git',
12-
];
13-
return new RegExp(`(${patterns.join(')|(')})`).test(data);
10+
const patterns = ['To(.+)\.git'];
11+
const antiPatterns = ['error:'];
12+
return new RegExp(`(${patterns.join(')|(')})`).test(data) && !new RegExp(`(${antiPatterns.join(')|(')})`).test(data);
1413
}
1514

1615
exports.middleware = store => next => (action) => {

0 commit comments

Comments
 (0)