verbose

package
v0.38.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package verbose centralizes devrig's --verbose / DEVRIG_VERBOSE mode. When enabled, the orchestrator's child processes (k3d, helm, kubectl, docker, docker compose) stream their output live to stderr instead of being captured silently, so a hanging or failing step shows what it is doing in real time.

State is carried in an environment variable rather than threaded through every call: the --verbose flag sets it once at startup, and every code path — and every child process devrig spawns — observes the same setting.

Index

Constants

View Source
const EnvVar = "DEVRIG_VERBOSE"

EnvVar enables verbose mode when set to a non-empty value.

Variables

This section is empty.

Functions

func Enable

func Enable()

Enable turns verbose mode on for this process and any children it spawns.

func Enabled

func Enabled() bool

Enabled reports whether verbose mode is on.

func Run

func Run(cmd *exec.Cmd) (string, error)

Run executes cmd and returns its trimmed combined output (stdout+stderr), like exec.Cmd.CombinedOutput. When verbose is enabled it additionally streams that output to stderr as the command produces it. The caller may set cmd.Env, cmd.Dir, etc. beforehand; Run only assigns the output writers.

func RunSplit

func RunSplit(cmd *exec.Cmd) (stdout, stderr string, err error)

RunSplit executes cmd capturing stdout and stderr separately — for commands whose stdout is parsed (JSON, kubeconfig) and must not be polluted by log lines on stderr. When verbose is enabled, stderr is also streamed live.

Types

This section is empty.

Jump to

Keyboard shortcuts

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