addToSetup
import { addToSetup } from "https://garn.io/ts/v0.0.20/environment.ts";
Appends the given bash snippet to the setup of the Environment
. The setup
will be executed when running things in an environment.
If type
is set to "sandboxed"
, it'll be executed as a setup step for
Check
s and Package
s, but not for Executable
s and garn enter
. If
type
is set to "unsandboxed"
, the setup step is going to be executed in
all 4 cases.
(Check
s and Package
s are running in sandboxes to make them completely
deterministic. That's why they have to be treated differently here. The most
common example for how the Environment
for these sandboxes works
differently is, that we have to copy the source files into the sandbox, to
allow Check
s and Package
s to access them. Whereas with Executable
s and
garn enter
, your source files are already available normally through the
file system.)