mirror of
https://github.com/desktop/desktop
synced 2024-09-17 23:21:55 +00:00
Fix getRemotes for promisor remotes
The printout for promisor remotes (from partial clones) does not end in "(fetch)". Instead, it ends in "(fetch) [filter=filterType]". This commit changes getRemotes to use a regex instead of `endsWith()` to account for this case. Co-Authored-By: Sky <2097064+skyrossm@users.noreply.github.com>
This commit is contained in:
parent
42132b82bb
commit
139c110221
|
@ -25,7 +25,7 @@ export async function getRemotes(
|
|||
const output = result.stdout
|
||||
const lines = output.split('\n')
|
||||
const remotes = lines
|
||||
.filter(x => x.endsWith('(fetch)'))
|
||||
.filter(x => /\(fetch\)( \[.+\])?$/.test(x))
|
||||
.map(x => x.split(/\s+/))
|
||||
.map(x => ({ name: x[0], url: x[1] }))
|
||||
|
||||
|
|
Loading…
Reference in a new issue