MCPcopy Create free account
hub / github.com/alibaba/open-code-review / runShell

Function runShell

scripts/github-actions/action-contract.test.js:280–294  ·  view source on GitHub ↗
(script, env, fixture)

Source from the content-addressed store, hash-verified

278}
279
280function runShell(script, env, fixture) {
281 const result = spawnSync("/bin/bash", ["--noprofile", "--norc", "-eo", "pipefail", "-c", script], {
282 cwd: ROOT,
283 env: Object.assign({}, process.env, {
284 PATH: `${fixture.bin}:${process.env.PATH || ""}`,
285 OCR_CALLS: fixture.callsPath,
286 OCR_NPM_CALLS: fixture.npmCallsPath,
287 OCR_CONFIG: fixture.configPath,
288 GITHUB_OUTPUT: path.join(fixture.dir, "github-output"),
289 GITHUB_ENV: path.join(fixture.dir, "github-env"),
290 }, env),
291 encoding: "utf8",
292 });
293 return result;
294}
295
296function runStep(step, values, fixture, extraEnv = {}, options = {}) {
297 let script = renderedRun(step, values);

Callers 5

runStepFunction · 0.85
runPrRefsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected