Skip to content

Commit 007aec4

Browse files
resources/utils: fix git().revList (#3763)
1 parent f851eba commit 007aec4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

resources/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ export function git(options?: GITOptions) {
7272
},
7373
revList(...args: ReadonlyArray<string>): Array<string> {
7474
const allArgs = ['rev-list', ...cmdOptions, ...args];
75-
return spawnOutput('git', allArgs, options).split('\n');
75+
const result = spawnOutput('git', allArgs, options);
76+
return result === '' ? [] : result.split('\n');
7677
},
7778
catFile(...args: ReadonlyArray<string>): string {
7879
return spawnOutput('git', ['cat-file', ...cmdOptions, ...args], options);

0 commit comments

Comments
 (0)