MCPcopy Create free account
hub / github.com/angular/dev-infra / run

Method run

ng-dev/utils/git/git-client.ts:69–77  ·  view source on GitHub ↗

Executes the given git command. Throws if the command fails.

(args: string[], options?: GitCommandRunOptions)

Source from the content-addressed store, hash-verified

67
68 /** Executes the given git command. Throws if the command fails. */
69 run(args: string[], options?: GitCommandRunOptions): Omit<SpawnSyncReturns<string>, 'status'> {
70 const result = this.runGraceful(args, options);
71 if (result.status !== 0) {
72 throw new GitCommandError(this, args);
73 }
74 // Omit `status` from the type so that it's obvious that the status is never
75 // non-zero as explained in the method description.
76 return result as Omit<SpawnSyncReturns<string>, 'status'>;
77 }
78
79 /**
80 * Spawns a given Git command process. Does not throw if the command fails. Additionally,

Callers 15

hasCommitMethod · 0.95
isShallowRepoMethod · 0.95
getDiffStatsMethod · 0.45
rebasePrFunction · 0.45
mergeMethod · 0.45
cleanupFunction · 0.45
fetchTargetBranchesFunction · 0.45
createMergeCommentFunction · 0.45
checkMethod · 0.45

Calls 1

runGracefulMethod · 0.95

Tested by

no test coverage detected