Documentation ¶
Overview ¶
Package exec provides a wrapper around the os/exec package
Index ¶
- 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 GetOSShell(shellPref Shell) (string, []string)
- func IsPowershell(shellName string) bool
- func LaunchURL(url string) error
- type Config
- type Shell
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 GetOSShell ¶ added in v0.25.1
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.