toolbx
Run commands or block-scoped operations inside a Toolbx container.
Functions
run cmd *args … -> nil
Runs a command inside a toolbox container.
Parameters
| Name | Type | Description |
|---|---|---|
cmd |
(Str | fs.Path) |
Program to run. |
:name? |
Str |
Toolbox container. Defaults to the default toolbox. |
:cd? |
(Str | fs.Path) |
Working directory in the container. |
:env? |
BaseDict[Str | Sym, Value] |
Environment overrides. nil unsets a variable, and :INHERIT: copies it
from the calling context. |
*args |
Value |
Arguments passed verbatim to cmd. |
< |
Iter[Value] |
|
> |
Sink[Str] |
Example
with[R] block … -> R
Runs block inside a toolbox container.
Filesystem access, spawned programs, and environment use the toolbox for the duration of the block.
Parameters
| Name | Type | Description |
|---|---|---|
block |
(() -> R) |
Block to run. |
:name? |
Str |
Toolbox container. Defaults to the default toolbox. |
:cd? |
(Str | fs.Path) |
Initial working directory in the container. |
:env? |
BaseDict[Str | Sym, Value] |
Initial environment overrides. nil unsets a variable, and :INHERIT:
copies it from the calling context. |