|
|
@ -77,11 +77,9 @@ func (b *Builder) Diff() (string, bool, error) {
|
|
|
|
ctx, cancel := context.WithTimeout(context.Background(), b.timeout)
|
|
|
|
ctx, cancel := context.WithTimeout(context.Background(), b.timeout)
|
|
|
|
defer cancel()
|
|
|
|
defer cancel()
|
|
|
|
|
|
|
|
|
|
|
|
if b.spinner != nil {
|
|
|
|
err = b.startSpinner()
|
|
|
|
err = b.spinner.Start()
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return "", false, err
|
|
|
|
return "", false, fmt.Errorf("failed to start spinner: %w", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var diffErrs []error
|
|
|
|
var diffErrs []error
|
|
|
@ -151,11 +149,9 @@ func (b *Builder) Diff() (string, bool, error) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if b.spinner != nil {
|
|
|
|
err = b.stopSpinner()
|
|
|
|
err = b.spinner.Stop()
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return "", createdOrDrifted, err
|
|
|
|
return "", createdOrDrifted, fmt.Errorf("failed to stop spinner: %w", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return output.String(), createdOrDrifted, errors.Reduce(errors.Flatten(errors.NewAggregate(diffErrs)))
|
|
|
|
return output.String(), createdOrDrifted, errors.Reduce(errors.Flatten(errors.NewAggregate(diffErrs)))
|
|
|
|