()
| 134 | } |
| 135 | |
| 136 | export 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 | |
| 151 | export async function setupCodeRoadRemote(repo: string): Promise<never | void> { |
| 152 | // check coderoad remote not taken |
no test coverage detected