Skip to main content

add_cmd_util

Function add_cmd_util 

Source
pub fn add_cmd_util(lua: &Lua, quiet: bool) -> Result<(), Error>
Expand description

Exposes system command and patching utilities to the Lua environment.

These functions provide the bridge to the host operating system’s tools:

  • cmd: Executes a shell command in a persistent session and captures its output and exit code.
  • zpatch: A wrapper around the patch command for applying diffs.

All commands are executed relative to the BUILD_DIR and respect the user’s environment and Zoi’s quiet/verbose settings.