vigiles API reference
    Preparing search index...

    Function runScript

    • Run a program and report what it did — exit code, both streams, and (when confined) its writes and egress. Synchronous, so it composes inside an eval's measure. command goes through a shell, so the exact string a project ships (args, env refs, pipes) works verbatim.

      This is the right tier for a plain helper script — a bash/node/python program that isn't a hook. It has no decision to report, so the result carries none.

      const r = runScript("bash scripts/check-links.sh", { cwd: repo });
      assert.equal(r.exitCode, 0);
      assert.match(r.stderr, /0 broken links/); // advisory output lives here

      Running something you didn't write? Pass trusted: false (or sandbox: "auto") to confine it — which is also what records filesWritten.

      Parameters

      Returns ScriptRunResult