-
Notifications
You must be signed in to change notification settings - Fork 278
/
pkg.go
71 lines (66 loc) · 2.09 KB
/
pkg.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Code generated by cuelang.org/go/pkg/gen. DO NOT EDIT.
// Package exec defines tasks for running commands.
//
// These are the supported tasks:
//
// // Run executes the given shell command.
// Run: {
// $id: *"tool/exec.Run" | "exec" // exec for backwards compatibility
//
// // cmd is the command to run.
// cmd: string | [string, ...string]
//
// // dir specifies the working directory of the command.
// // The default is the current working directory.
// dir?: string
//
// // env defines the environment variables to use for this system.
// // If the value is a list, the entries mus be of the form key=value,
// // where the last value takes precendence in the case of multiple
// // occurrances of the same key.
// env: [string]: 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. If stdin is null, the stdin
// // of the current process is redirected to this command (the default).
// // If it is of typ bytes or string, that input will be used instead.
// stdin: *null | 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
// }
package exec
import (
"cuelang.org/go/internal/core/adt"
"cuelang.org/go/pkg/internal"
)
func init() {
internal.Register("tool/exec", pkg)
}
var _ = adt.TopKind // in case the adt package isn't used
var pkg = &internal.Package{
Native: []*internal.Builtin{},
CUE: `{
Run: {
$id: *"tool/exec.Run" | "exec"
cmd: string | [string, ...string]
dir?: string
env: {
[string]: string | [...=~"="]
}
stdout: *null | string | bytes
stderr: *null | string | bytes
stdin: *null | string | bytes
success: bool
}
}`,
}