Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 2ca5555

Browse files
committed
Ommit changes with a count of 0 from summary
1 parent e143f59 commit 2ca5555

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

internals/secrethub/migrate.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -583,9 +583,15 @@ func (cmd *MigrateApplyCommand) Run() error {
583583

584584
fmt.Fprintln(cmd.io.Output())
585585
fmt.Fprintln(cmd.io.Output(), "Summary:")
586-
fmt.Fprintf(cmd.io.Output(), "%d vaults will be created\n", vaultCreateCount)
587-
fmt.Fprintf(cmd.io.Output(), "%d items will be created\n", itemCreateCount)
588-
fmt.Fprintf(cmd.io.Output(), "%d fields will be updated\n", fieldUpdateCount)
586+
if vaultCreateCount != 0 {
587+
fmt.Fprintf(cmd.io.Output(), "%d vaults will be created\n", vaultCreateCount)
588+
}
589+
if itemCreateCount != 0 {
590+
fmt.Fprintf(cmd.io.Output(), "%d items will be created\n", itemCreateCount)
591+
}
592+
if fieldUpdateCount != 0 {
593+
fmt.Fprintf(cmd.io.Output(), "%d fields will be updated\n", fieldUpdateCount)
594+
}
589595

590596
if !cmd.update {
591597
fmt.Fprintln(cmd.io.Output())

0 commit comments

Comments
 (0)