Skip to content

Commit 84b552c

Browse files
fix: suppress error
1 parent 11c811c commit 84b552c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

__tests__/git-helper.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ describe('GitHelper', () => {
184184
`rm -rdf '${workDir}'`,
185185
'git init \'.\'',
186186
'git remote add origin \'https://octocat:[email protected]/hello/world.git\' > /dev/null 2>&1 || :',
187-
'git fetch origin',
187+
'git fetch origin || :',
188188
]);
189189
});
190190

@@ -197,7 +197,7 @@ describe('GitHelper', () => {
197197
`rm -rdf '${workDir}'`,
198198
'git init \'.\'',
199199
'git remote add origin \'https://octocat:[email protected]/hello/world.git\' > /dev/null 2>&1 || :',
200-
'git fetch --no-tags origin',
200+
'git fetch --no-tags origin || :',
201201
]);
202202
});
203203

@@ -210,7 +210,7 @@ describe('GitHelper', () => {
210210
`rm -rdf '${workDir}'`,
211211
'git init \'.\'',
212212
'git remote add origin \'https://octocat:[email protected]/hello/world.git\' > /dev/null 2>&1 || :',
213-
'git fetch origin \'+refs/pull/*/merge:refs/remotes/pull/*/merge\' \'+refs/heads/hoge:refs/remotes/origin/hoge\'',
213+
'git fetch origin \'+refs/pull/*/merge:refs/remotes/pull/*/merge\' \'+refs/heads/hoge:refs/remotes/origin/hoge\' || :',
214214
]);
215215
});
216216
});

src/git-helper.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ export default class GitHelper {
275275
'origin',
276276
...(refspec ?? []),
277277
],
278+
suppressError: true,
278279
stderrToStdout: true,
279280
});
280281
};

0 commit comments

Comments
 (0)