command

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package command provides utilities for running external commands with proper stdout/stderr handling across different platforms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCommand

func RunCommand(cmd *exec.Cmd, interceptOut bool) (string, error)

RunCommand executes a command and handles its output. If interceptOut is true, stdout is captured and returned as a string. If interceptOut is false, stdout is passed through to os.Stdout. Stderr is handled specially for docker commands (printed as normal output) and for other commands (shown as warnings on success, errors on failure).

func StartCommand

func StartCommand(cmd *exec.Cmd) error

StartCommand starts cmd after applying platform-specific configuration, but without waiting for it to exit. It does not redirect stdout or stderr, allowing callers to set up pipes as needed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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