Skip to content

process

luau
local process = require("@std/process")

process.cwd

Returns the current working directory as a Path.

luau
() -> Path

process.execPath

Returns the path of the currently running lute executable as a Path.

luau
() -> Path

process.exit

Exits the current process with the given exitcode.

luau
(exitcode: number) -> never

process.homedir

Returns the current user's home directory as a Path.

luau
() -> Path

process.run

Runs the program given by args[1] with the remaining entries as arguments.

Returns the process result including exit code and any captured output.

luau
(args: { string }, options: ProcessRunOptions?) -> ProcessResult

process.system

Runs command through the system shell. Returns the process result.

luau
(command: string, options: ProcessSystemOptions?) -> ProcessResult