process_exec()
def process_exec(command, args, env, working_directory, stdin)
Executes a command when the script is evaluated.
The command executes during evaluation. It is not recommended to run functions when adding rules because evalation is skipped if none of the starlark files have changed.
Example:
process_exec(
"ls",
args = ["-alt"],
working_directory = ".",
env = {
"PATH": "/usr/bin:/bin"
}
)
Args
command
- The command to executeargs
- The arguments to pass to the commandenv
- The environment variables to setworking_directory
- The working directory to execute the command instdin
- The standard input to pass to the command
Returns
dict: with members status
, stdout
, and stderr