command

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package command implements the command action handler.

The command action executes commands directly without shell interpolation. This is safer than shell when you have a known command with arguments, as it prevents shell injection attacks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct{}

Handler implements the Handler interface for command actions.

func (*Handler) DryRun

func (h *Handler) DryRun(ctx actions.Context, step *config.Step) error

DryRun logs what would be executed without actually running the command.

func (*Handler) Execute

func (h *Handler) Execute(ctx actions.Context, step *config.Step) (actions.Result, error)

Execute runs the command action with retry logic if configured.

func (Handler) Metadata

func (Handler) Metadata() actions.ActionMetadata

Metadata returns metadata about the command action.

func (*Handler) Run

func (h *Handler) Run(ctx actions.Context, step *config.Step) (actions.Result, error)

Run is the Spec 16 entry point. Like shell, command actions can't be predicted for idempotency. Plan mode surfaces the rendered argv so users see what would run. WouldChange is set because command steps are assumed to mutate state.

func (*Handler) Validate

func (h *Handler) Validate(step *config.Step) error

Validate checks if the command configuration is valid.

Jump to

Keyboard shortcuts

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