executil

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpPATH

func DumpPATH()

DumpPATH logs the current PATH and lists all executable files found in each directory. Call this in debug dumps so that missing-binary problems are obvious from the logs alone.

Types

type Commander

type Commander interface {
	Run(ctx context.Context, name string, args ...string) ([]byte, error)
}

Commander abstracts command execution for testing.

type ExecCommander

type ExecCommander struct{}

ExecCommander executes real system commands via os/exec.

func (*ExecCommander) Run

func (e *ExecCommander) Run(ctx context.Context, name string, args ...string) ([]byte, error)

Run executes a system command and returns its combined output. On failure the error includes the sanitized, truncated raw command output and the resolved PATH so that missing-binary issues are immediately diagnosable. Newlines in the output are replaced with spaces to keep structured log values single-line.

Jump to

Keyboard shortcuts

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