in gitlab/src/utils.ts [122:137]
async function gitOutput(
args: string[],
ignoreReturnCode = false
): Promise<CommandOutput> {
const result = await execAsync('git', args, true)
if (result.returnCode !== 0 && ignoreReturnCode) {
console.warn(
`Git command failed: git ${args.join(' ')}\nExit code: ${result.returnCode}\nStdout: ${result.stdout}\nStderr: ${result.stderr}`
)
} else if (result.returnCode !== 0) {
throw new Error(
`git command failed: git ${args.join(' ')} returned ${result.returnCode}\nStdout: ${result.stdout}\nStderr: ${result.stderr}`
)
}
return result
}