package exec

import "cuelang.org/go/pkg/tool/exec"

Package exec defines tasks for running commands.

These are the supported tasks:

// Run executes the given shell command.
Run: {
	kind: *"tool/exec.Run" | "exec" // exec for backwards compatibility

	// cmd is the command to run.
	cmd: string | [string, ...string]

	// install is an optional command to install the binaries needed
	// to run the command.
	install?: string | [string, ...string]

	// env defines the environment variables to use for this system.
	env <Key>: string

	// stdout captures the output from stdout if it is of type bytes or string.
	// The default value of null indicates it is redirected to the stdout of the
	// current process.
	stdout: *null | string | bytes

	// stderr is like stdout, but for errors.
	stderr: *null | string | bytes

	// stdin specifies the input for the process.
	stdin?: string | bytes

	// success is set to true when the process terminates with with a zero exit
	// code or false otherwise. The user can explicitly specify the value
	// force a fatal error if the desired success code is not reached.
	success: bool
}

Index

Source Files

doc.go exec.go

Version
v0.0.4-rc1
Published
Jul 1, 2019
Platform
darwin/amd64
Imports
7 packages
Last checked
42 minutes ago

Tools for package owners.