command

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package command provides helpers to execute external commands with logging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExecutablePath added in v0.8.0

func GetExecutablePath(commandOverrides map[string]string, commandName string) string

GetExecutablePath finds the path for a given command, checking for an override in the provided commandOverrides map first.

func Run

func Run(ctx context.Context, command string, arg ...string) error

Run executes a program (with arguments) and captures any error output. It is a convenience wrapper around RunWithEnv.

func RunWithEnv added in v0.8.0

func RunWithEnv(ctx context.Context, env map[string]string, command string, arg ...string) error

RunWithEnv executes a program (with arguments) and optional environment variables and captures any error output. If env is nil or empty, the command inherits the environment of the calling process.

Types

This section is empty.

Jump to

Keyboard shortcuts

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