Skip to content

Commit

Permalink
feat: support preview all details with flag (#1233)
Browse files Browse the repository at this point in the history
  • Loading branch information
liu-hm19 authored Jul 25, 2024
1 parent 1e8dabc commit 86905a8
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions pkg/cmd/preview/preview.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 86905a8

Please sign in to comment.