Complete library adoption validation and cleanup
This commit is contained in:
@@ -33,6 +33,11 @@ type processInputs struct {
|
||||
ProtectedPaths []string
|
||||
}
|
||||
|
||||
type runtimePreparationError struct{ cause error }
|
||||
|
||||
func (e *runtimePreparationError) Error() string { return e.cause.Error() }
|
||||
func (e *runtimePreparationError) Unwrap() error { return e.cause }
|
||||
|
||||
func loadProcessInputs(ctx context.Context, input processInput, mode commandkit.ReportingMode) (*processInputs, error) {
|
||||
if mode == commandkit.ReportingModeQuiet && input.Output.Value == "" {
|
||||
return nil, fmt.Errorf("quiet processing requires an output file or /dev/null")
|
||||
@@ -44,7 +49,7 @@ func loadProcessInputs(ctx context.Context, input processInput, mode commandkit.
|
||||
}
|
||||
runtime, err := llm.NewRuntime(ctx, loaded, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, &runtimePreparationError{cause: err}
|
||||
}
|
||||
if err := ctx.Err(); err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user