}
// Display changes
- var changes []string
- if len(resp.FileChanges) > 0 {
- changes = append(changes,
- s.formatFileChanges(resp.FileChanges))
- }
- if len(resp.PackageChanges) > 0 {
- changes = append(changes,
- s.formatPackageChanges(resp.PackageChanges))
- }
- if len(resp.ServiceChanges) > 0 {
- changes = append(changes,
- s.formatServiceChanges(resp.ServiceChanges))
- }
- if len(resp.CommandChanges) > 0 {
- changes = append(changes,
- s.formatCommandChanges(resp.CommandChanges))
- }
- if len(changes) > 0 {
- s.logf(safcm.LogInfo, true, "%s",
- "\n"+strings.Join(changes, "\n"))
+ changes := s.formatChanges(resp)
+ if changes != "" {
+ s.logf(safcm.LogInfo, true, "%s", changes)
}
if resp.Error != "" {