(credential: Map<string, string>)
| 36 | } |
| 37 | |
| 38 | export const formatCredential = (credential: Map<string, string>) => { |
| 39 | const lines = [] |
| 40 | for (const [k, v] of credential) { |
| 41 | if (v.includes('\n') || v.includes('\0')) { |
| 42 | throw new Error(`forbidden characters in credential value: ${k}`) |
| 43 | } |
| 44 | lines.push(`${k.replace(/\[\d+\]$/, '[]')}=${v}\n`) |
| 45 | } |
| 46 | |
| 47 | return lines.join('') |
| 48 | } |
| 49 | |
| 50 | // Can't use git() as that will call withTrampolineEnv which calls this method |
| 51 | const exec = ( |
no test coverage detected