shellcommand

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedShell    = fmt.Errorf("unsupported shell")
	ErrUnsupportedPlatform = errors.New("unsupported platform")
)

Functions

func Command

func Command(command string) *exec.Cmd

func FormatPlatformCommand

func FormatPlatformCommand(command, platform, shell string) (string, error)

FormatPlatformCommand formats a command for a specific platform and shell

func FormatShellCommand

func FormatShellCommand(command, shell string) (string, error)

FormatShellCommand formats a shell command

func PrepareCommand

func PrepareCommand(command string, platform string, shell string, fullEnv bool, env map[string]string, workDir string, stdin io.Reader, stdoutWriter io.Writer, stderrWriter io.Writer) (*exec.Cmd, error)

PrepareCommand prepares a command to be executed

func SplitCommand

func SplitCommand(command string) ([]string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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