diff --git a/pkg/cmd/preview/preview.go b/pkg/cmd/preview/preview.go index 02a7ef88..72b68f1c 100644 --- a/pkg/cmd/preview/preview.go +++ b/pkg/cmd/preview/preview.go @@ -295,16 +295,20 @@ func (o *PreviewOptions) Run() error { // detail detection if o.Detail { - for { - var target string - target, err = changes.PromptDetails(o.UI) - if err != nil { - return err + if o.All { + changes.OutputDiff("all") + } else { + for { + var target string + target, err = changes.PromptDetails(o.UI) + if err != nil { + return err + } + if target == "" { // Cancel option + break + } + changes.OutputDiff(target) } - if target == "" { // Cancel option - break - } - changes.OutputDiff(target) } } return nil