MCPcopy Index your code
hub / github.com/angular/dev-infra / runGitInTmpDir

Function runGitInTmpDir

ng-dev/utils/testing/sandbox-testing.ts:14–20  ·  view source on GitHub ↗
(args: string[])

Source from the content-addressed store, hash-verified

12
13/** Runs a Git command in the temporary repo directory. */
14export function runGitInTmpDir(args: string[]): string {
15 const result = spawnSync(process.env['GIT_BIN']!, args, {cwd: testTmpDir, encoding: 'utf8'});
16 if (result.status !== 0) {
17 throw Error(`Error for Git command: ${result.stdout} ${result.stderr}`);
18 }
19 return result.stdout.trim();
20}
21
22/** Helper class that can be used to initialize and control the sandbox test repo. */
23export class SandboxGitRepo {

Callers 8

constructorMethod · 0.85
commitMethod · 0.85
branchOffMethod · 0.85
switchToBranchMethod · 0.85
createTagForHeadMethod · 0.85
cherryPickMethod · 0.85
getShaForCommitIdMethod · 0.85
publish-ci.spec.tsFile · 0.85

Calls 1

spawnSyncFunction · 0.85

Tested by

no test coverage detected