Skip to content

Commit 63203c6

Browse files
authored
fix(git): prevent users from passing additional flags to ls-remote (#2661)
before: error: unknown option `test' after: fatal: strange pathname '--test' blocked
1 parent 7323245 commit 63203c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shared/extensions/git.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ export class GitExtension {
252252
// TODO: make a promise 'pipe' function
253253
if (branches.length === 0) {
254254
try {
255-
const { stdout } = await execFileAsync(api.git.path, ['ls-remote', '--heads', remote.fetchUrl ?? ''])
255+
const { stdout } = await execFileAsync(api.git.path, ['ls-remote', '--heads', '--', remote.fetchUrl ?? ''])
256256
return stdout
257257
.toString()
258258
.split(/\r?\n/)

0 commit comments

Comments
 (0)