Documentation ¶
Overview ¶
Package exec provides a wrapper around the os/exec package
Index ¶
- Variables
- func Cmd(command string, args ...string) (string, string, error)
- func CmdWithContext(ctx context.Context, config Config, command string, args ...string) (string, string, error)
- func CmdWithPrint(command string, args ...string) error
- func ExitOnInterrupt()
- func GetOSShell(shellPref types.ZarfComponentActionShell) (string, []string)
- func IsPowershell(shellName string) bool
- func LaunchURL(url string) error
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var SuppressGlobalInterrupt = false
SuppressGlobalInterrupt suppresses the global error on an interrupt
Functions ¶
func CmdWithContext ¶
func CmdWithContext(ctx context.Context, config Config, command string, args ...string) (string, string, error)
CmdWithContext executes a given command with given config.
func CmdWithPrint ¶
CmdWithPrint executes a given command with given config and prints the command.
func ExitOnInterrupt ¶ added in v0.28.2
func ExitOnInterrupt()
ExitOnInterrupt catches an interrupt and exits with fatal error
func GetOSShell ¶ added in v0.25.1
func GetOSShell(shellPref types.ZarfComponentActionShell) (string, []string)
GetOSShell returns the shell and shellArgs based on the current OS
func IsPowershell ¶ added in v0.26.0
IsPowershell returns whether a shell name is powershell
Types ¶
Click to show internal directories.
Click to hide internal directories.