MCPcopy Index your code
hub / github.com/coderoad/coderoad-vscode / checkRemoteExists

Function checkRemoteExists

src/services/git/index.ts:136–149  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134}
135
136export async function checkRemoteExists(): Promise<boolean> {
137 try {
138 const { stdout, stderr } = await exec({ command: 'git remote -v' })
139 if (stderr) {
140 return false
141 }
142 // string match on remote output
143 // TODO improve the specificity of this regex
144 return !!stdout.match(gitOrigin)
145 } catch (error: any) {
146 logger(`Warn: ${error.message}`)
147 return false
148 }
149}
150
151export async function setupCodeRoadRemote(repo: string): Promise<never | void> {
152 // check coderoad remote not taken

Callers 1

setupCodeRoadRemoteFunction · 0.85

Calls 2

execFunction · 0.90
loggerFunction · 0.50

Tested by

no test coverage detected