executor

package
v0.0.61 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintDependencyTree

func PrintDependencyTree(e *DependencyError, w io.Writer)

PrintDependencyTree writes an indented tree of the dependency chain to w. The failing node (last in chain) is annotated in red. Respects NO_COLOR automatically via fatih/color.

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

func ChildExecutorCtx

func ChildExecutorCtx(ctx *Context, command *config.Command) *Context

func NewExecutorCtx

func NewExecutorCtx(ctx context.Context, command *config.Command) *Context

type DependencyError

type DependencyError struct {
	Chain []string
	Err   error
}

DependencyError carries the full dependency chain when a command fails. Chain is outermost-first (e.g., ["deploy", "build", "lint"]).

func (*DependencyError) Error

func (e *DependencyError) Error() string

func (*DependencyError) ExitCode

func (e *DependencyError) ExitCode() int

ExitCode propagates the exit code from the innermost ExecuteError, or returns 1.

func (*DependencyError) FailureMessage

func (e *DependencyError) FailureMessage() string

func (*DependencyError) TreeMessage

func (e *DependencyError) TreeMessage() string

func (*DependencyError) Unwrap

func (e *DependencyError) Unwrap() error

type ExecuteError

type ExecuteError struct {
	// contains filtered or unexported fields
}

func (*ExecuteError) Cause

func (e *ExecuteError) Cause() error

func (*ExecuteError) Error

func (e *ExecuteError) Error() string

func (*ExecuteError) ExitCode

func (e *ExecuteError) ExitCode() int

ExitCode will return exit code from underlying ExitError or returns default error code.

func (*ExecuteError) Unwrap

func (e *ExecuteError) Unwrap() error

type Executor

type Executor struct {
	// contains filtered or unexported fields
}

func NewExecutor

func NewExecutor(cfg *config.Config, out io.Writer) *Executor

func (*Executor) Execute

func (e *Executor) Execute(ctx *Context) error

Execute executes command and it depends recursively Command can be executed in parallel.

Jump to

Keyboard shortcuts

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