github.com/solo-io/cue@v0.4.7/pkg/tool/exec/exec.cue (about)

     1  // Copyright 2018 The CUE Authors
     2  // 
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  // 
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  // 
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package exec
    16  
    17  // Run executes the given shell command.
    18  Run: {
    19  	$id: *"tool/exec.Run" | "exec" // exec for backwards compatibility
    20  
    21  	// cmd is the command to run.
    22  	cmd: string | [string, ...string]
    23  
    24  	// dir specifies the working directory of the command.
    25  	// The default is the current working directory.
    26  	dir?: string
    27  
    28  	// env defines the environment variables to use for this system.
    29  	// If the value is a list, the entries mus be of the form key=value,
    30  	// where the last value takes precendence in the case of multiple
    31  	// occurrances of the same key.
    32  	env: [string]: string | [...=~"="]
    33  
    34  	// stdout captures the output from stdout if it is of type bytes or string.
    35  	// The default value of null indicates it is redirected to the stdout of the
    36  	// current process.
    37  	stdout: *null | string | bytes
    38  
    39  	// stderr is like stdout, but for errors.
    40  	stderr: *null | string | bytes
    41  
    42  	// stdin specifies the input for the process. If stdin is null, the stdin
    43  	// of the current process is redirected to this command (the default).
    44  	// If it is of typ bytes or string, that input will be used instead.
    45  	stdin: *null | string | bytes
    46  
    47  	// success is set to true when the process terminates with with a zero exit
    48  	// code or false otherwise. The user can explicitly specify the value
    49  	// force a fatal error if the desired success code is not reached.
    50  	success: bool
    51  }