legacycli

package
v1.26.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoDepGraphsFound = errors.New("no depgraphs found")

Functions

func ChooseGraphArgument

func ChooseGraphArgument(config configuration.Configuration) (string, parsers.OutputParser)

func ExtractLegacyCLIError

func ExtractLegacyCLIError(input error, data []workflow.Data) error

ExtractLegacyCLIError extracts the error message from the legacy cli if possible.

func InvokeLegacy added in v1.21.3

InvokeLegacy invokes the legacy CLI workflow and parses its output, returning the parsed dep-graph outputs. Returns ErrNoDepGraphsFound when the invocation succeeds but produces no graphs.

func IsNoProjectFoundError added in v1.21.3

func IsNoProjectFoundError(err error) bool

IsNoProjectFoundError reports whether the error chain contains an error with exit code 3. Exit code 3 from the legacy CLI means "no projects found to test".

func MapToWorkflowData

func MapToWorkflowData(depGraphs []parsers.DepGraphOutput, logger *zerolog.Logger) []gafworkflow.Data

func PrepareLegacyFlags

func PrepareLegacyFlags(argument string, cfg configuration.Configuration, logger *zerolog.Logger)

Types

type CLIJSONError

type CLIJSONError struct {
	Ok       bool   `json:"ok"`
	ErrorMsg string `json:"error"`
	Path     string `json:"path"`
	// contains filtered or unexported fields
}

CLIJSONError is the error type returned by the legacy cli.

func (*CLIJSONError) Error

func (e *CLIJSONError) Error() string

Error returns the LegacyCliJsonError error message.

func (*CLIJSONError) Unwrap

func (e *CLIJSONError) Unwrap() error

type ExitCoder added in v1.21.3

type ExitCoder interface {
	ExitCode() int
}

ExitCoder allows checking for exit codes without depending on a concrete error type.

Jump to

Keyboard shortcuts

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