You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/pkg/actions/types.go
+8-7
Original file line number
Diff line number
Diff line change
@@ -23,12 +23,12 @@ type ActionSet struct {
23
23
24
24
// ActionDefaults sets the default configs for child actions
25
25
typeActionDefaultsstruct {
26
-
Mutebool`json:"mute,omitempty" jsonschema:"description=Hide the output of commands during execution (default false)"`
27
-
MaxTotalSecondsint`json:"maxTotalSeconds,omitempty" jsonschema:"description=Default timeout in seconds for commands (default to 0, no timeout)"`
28
-
MaxRetriesint`json:"maxRetries,omitempty" jsonschema:"description=Retry commands given number of times if they fail (default 0)"`
29
-
Dirstring`json:"dir,omitempty" jsonschema:"description=Working directory for commands (default CWD)"`
30
-
Env []string`json:"env,omitempty" jsonschema:"description=Additional environment variables for commands"`
31
-
Shell exec.ExecShell`json:"shell,omitempty" jsonschema:"description=(cmd only) Indicates a preference for a shell for the provided cmd to be executed in on supported operating systems"`
26
+
Mutebool`json:"mute,omitempty" jsonschema:"description=Hide the output of commands during execution (default false)"`
27
+
MaxTotalSecondsint`json:"maxTotalSeconds,omitempty" jsonschema:"description=Default timeout in seconds for commands (default to 0, no timeout)"`
28
+
MaxRetriesint`json:"maxRetries,omitempty" jsonschema:"description=Retry commands given number of times if they fail (default 0)"`
29
+
Dirstring`json:"dir,omitempty" jsonschema:"description=Working directory for commands (default CWD)"`
30
+
Env []string`json:"env,omitempty" jsonschema:"description=Additional environment variables for commands"`
31
+
Shell exec.Shell`json:"shell,omitempty" jsonschema:"description=(cmd only) Indicates a preference for a shell for the provided cmd to be executed in on supported operating systems"`
32
32
}
33
33
34
34
// Action represents a single action to run
@@ -39,7 +39,7 @@ type Action struct {
39
39
Dir*string`json:"dir,omitempty" jsonschema:"description=The working directory to run the command in (default is CWD)"`
40
40
Env []string`json:"env,omitempty" jsonschema:"description=Additional environment variables to set for the command"`
41
41
Cmdstring`json:"cmd,omitempty" jsonschema:"description=The command to run. Must specify either cmd or wait for the action to do anything."`
42
-
Shell*exec.ExecShell`json:"shell,omitempty" jsonschema:"description=(cmd only) Indicates a preference for a shell for the provided cmd to be executed in on supported operating systems"`
42
+
Shell*exec.Shell`json:"shell,omitempty" jsonschema:"description=(cmd only) Indicates a preference for a shell for the provided cmd to be executed in on supported operating systems"`
43
43
DeprecatedSetVariablestring`json:"setVariable,omitempty" jsonschema:"description=[Deprecated] (replaced by setVariables) (onDeploy/cmd only) The name of a variable to update with the output of the command. This variable will be available to all remaining actions and components in the package. This will be removed in Zarf v1.0.0,pattern=^[A-Z0-9_]+$"`
44
44
SetVariables []variables.Variable`json:"setVariables,omitempty" jsonschema:"description=(onDeploy/cmd only) An array of variables to update with the output of the command. These variables will be available to all remaining actions and components in the package."`
45
45
Descriptionstring`json:"description,omitempty" jsonschema:"description=Description of the action to be displayed during package execution instead of the command"`
@@ -67,6 +67,7 @@ type ActionWaitNetwork struct {
67
67
Codeint`json:"code,omitempty" jsonschema:"description=The HTTP status code to wait for if using http or https,example=200,example=404"`
68
68
}
69
69
70
+
// Validate validates an Action struct instantiation
Copy file name to clipboardexpand all lines: src/pkg/utils/exec/exec.go
+3-3
Original file line number
Diff line number
Diff line change
@@ -27,8 +27,8 @@ type Config struct {
27
27
Stderr io.Writer
28
28
}
29
29
30
-
// ExecShell represents the desired shell to use for a given command
31
-
typeExecShellstruct {
30
+
// Shell represents the desired shell to use for a given command
31
+
typeShellstruct {
32
32
Windowsstring`json:"windows,omitempty" jsonschema:"description=(default 'powershell') Indicates a preference for the shell to use on Windows systems (note that choosing 'cmd' will turn off migrations like touch -> New-Item),example=powershell,example=cmd,example=pwsh,example=sh,example=bash,example=gsh"`
33
33
Linuxstring`json:"linux,omitempty" jsonschema:"description=(default 'sh') Indicates a preference for the shell to use on Linux systems,example=sh,example=bash,example=fish,example=zsh,example=pwsh"`
34
34
Darwinstring`json:"darwin,omitempty" jsonschema:"description=(default 'sh') Indicates a preference for the shell to use on macOS systems,example=sh,example=bash,example=fish,example=zsh,example=pwsh"`
0 commit comments