exec

package
v2.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommandArgsToLog added in v2.13.0

func GetCommandArgsToLog(cmd *exec.Cmd) string

GetCommandArgsToLog represents the given command in a way that we can copy-and-paste into a terminal

func Run

func Run(cmd *exec.Cmd) (string, error)

func RunWithExecRunOpts added in v2.6.0

func RunWithExecRunOpts(cmd *exec.Cmd, opts ExecRunOpts) (string, error)

func RunWithRedactor

func RunWithRedactor(cmd *exec.Cmd, redactor func(text string) string) (string, error)

Types

type ExecRunOpts added in v2.6.0

type ExecRunOpts struct {
	// Redactor redacts tokens from the output
	Redactor func(text string) string
	// TimeoutBehavior configures what to do in case of timeout
	TimeoutBehavior argoexec.TimeoutBehavior
	// SkipErrorLogging determines whether to skip logging of execution errors (rc > 0)
	SkipErrorLogging bool
	// CaptureStderr determines whether to capture stderr in addition to stdout
	CaptureStderr bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL