runner

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package runner shells out to external tools (Hugo). Output is streamed straight to the user's terminal rather than captured, so crofty never buffers tokens or secrets that pass through those tools.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capture

func Capture(dir, name string, args ...string) (string, error)

Capture runs name+args in dir and returns combined output without streaming. Use for idempotent setup steps whose expected failures (e.g. "already exists") should not clutter the terminal.

func CaptureEnv

func CaptureEnv(dir string, env []string, name string, args ...string) (string, error)

CaptureEnv is Capture with extra environment entries ("KEY=value") appended to the inherited environment.

func Look

func Look(name string) bool

Look reports whether a tool is on PATH.

func Run

func Run(dir, name string, args ...string) error

Run executes name+args in dir, streaming stdio to the user. It returns an error if the tool is missing or exits non-zero.

func RunTee

func RunTee(dir string, env []string, name string, args ...string) (string, error)

RunTee streams name+args output to the user (like Run) while also capturing stdout, so a caller can parse a result — e.g. a deploy URL — without hiding progress. Extra env entries ("KEY=value") are appended to the environment.

Types

This section is empty.

Jump to

Keyboard shortcuts

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