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

Function runShell

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

Source from the content-addressed store, hash-verified

265}
266
267function runShell(script, env, fixture) {
268 const result = spawnSync("/bin/bash", ["--noprofile", "--norc", "-eo", "pipefail", "-c", script], {
269 cwd: ROOT,
270 env: Object.assign({}, process.env, {
271 PATH: `${fixture.bin}:${process.env.PATH || ""}`,
272 OCR_CALLS: fixture.callsPath,
273 OCR_NPM_CALLS: fixture.npmCallsPath,
274 OCR_CONFIG: fixture.configPath,
275 GITHUB_OUTPUT: path.join(fixture.dir, "github-output"),
276 GITHUB_ENV: path.join(fixture.dir, "github-env"),
277 }, env),
278 encoding: "utf8",
279 });
280 return result;
281}
282
283function runStep(step, values, fixture, extraEnv = {}, options = {}) {
284 let script = renderedRun(step, values);

Callers 5

runStepFunction · 0.85
runPrRefsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected