Override for the actual Git client command execution.
(args: string[], options: SpawnSyncOptions = {})
| 77 | |
| 78 | /** Override for the actual Git client command execution. */ |
| 79 | override runGraceful(args: string[], options: SpawnSyncOptions = {}): SpawnSyncReturns<string> { |
| 80 | const [command, ...rawArgs] = args; |
| 81 | switch (command) { |
| 82 | case 'push': |
| 83 | this._push(rawArgs); |
| 84 | break; |
| 85 | case 'fetch': |
| 86 | this._fetch(rawArgs); |
| 87 | break; |
| 88 | case 'checkout': |
| 89 | this._checkout(rawArgs); |
| 90 | break; |
| 91 | case 'commit': |
| 92 | this._commit(rawArgs); |
| 93 | break; |
| 94 | } |
| 95 | |
| 96 | // Return a fake spawn sync return value. We error non-gracefully if any command fails |
| 97 | // in the tests, so we always return success and stub out the `SpawnSyncReturns` type. |
| 98 | return {status: 0, stderr: '', output: [], pid: -1, signal: null, stdout: ''}; |
| 99 | } |
| 100 | |
| 101 | /** Handler for the `git push` command. */ |
| 102 | private _push(args: string[]) { |
no test coverage detected