cuelang.org/go@v0.10.1/pkg/tool/exec/pkg.go (about)

     1  // Code generated by cuelang.org/go/pkg/gen. DO NOT EDIT.
     2  
     3  // Package exec defines tasks for running commands.
     4  //
     5  // These are the supported tasks:
     6  //
     7  //	// Run executes the given shell command.
     8  //	Run: {
     9  //		$id: *"tool/exec.Run" | "exec" // exec for backwards compatibility
    10  //
    11  //		// cmd is the command to run.
    12  //		// Simple commands can use a string, which is split by white space characters.
    13  //		// If any arguments include white space, use the list form.
    14  //		cmd: string | [string, ...string]
    15  //
    16  //		// dir specifies the working directory of the command.
    17  //		// The default is the current working directory.
    18  //		dir?: string
    19  //
    20  //		// env defines the environment variables to use for this system.
    21  //		// If the value is a list, the entries mus be of the form key=value,
    22  //		// where the last value takes precendence in the case of multiple
    23  //		// occurrances of the same key.
    24  //		env: {[string]: string} | [...=~"="]
    25  //
    26  //		// stdout captures the output from stdout if it is of type bytes or string.
    27  //		// The default value of null indicates it is redirected to the stdout of the
    28  //		// current process.
    29  //		stdout: *null | string | bytes
    30  //
    31  //		// stderr is like stdout, but for errors.
    32  //		stderr: *null | string | bytes
    33  //
    34  //		// stdin specifies the input for the process. If stdin is null, the stdin
    35  //		// of the current process is redirected to this command (the default).
    36  //		// If it is of typ bytes or string, that input will be used instead.
    37  //		stdin: *null | string | bytes
    38  //
    39  //		// success is set to true when the process terminates with a zero exit
    40  //		// code or false otherwise. The user can explicitly specify the value
    41  //		// force a fatal error if the desired success code is not reached.
    42  //		success: bool
    43  //
    44  //		// mustSucceed indicates whether a command must succeed, in which case success==false results in a fatal error.
    45  //		// This option is enabled by default, but may be disabled to control what is done when a command execution fails.
    46  //		mustSucceed: bool | *true
    47  //	}
    48  package exec
    49  
    50  import (
    51  	"cuelang.org/go/internal/core/adt"
    52  	"cuelang.org/go/internal/pkg"
    53  )
    54  
    55  func init() {
    56  	pkg.Register("tool/exec", p)
    57  }
    58  
    59  var _ = adt.TopKind // in case the adt package isn't used
    60  
    61  var p = &pkg.Package{
    62  	Native: []*pkg.Builtin{},
    63  	CUE: `{
    64  	Run: {
    65  		$id: *"tool/exec.Run" | "exec"
    66  		cmd: string | [string, ...string]
    67  		dir?: string
    68  		env: {
    69  			[string]: string
    70  		} | [...=~"="]
    71  		stdout:      *null | string | bytes
    72  		stderr:      *null | string | bytes
    73  		stdin:       *null | string | bytes
    74  		success:     bool
    75  		mustSucceed: bool | *true
    76  	}
    77  }`,
    78  }