Skip to content

Commit 6bbfccf

Browse files
mirkoCrobumirkoCrobu
authored andcommitted
finalize merge conflict
1 parent c7b4c36 commit 6bbfccf

File tree

1 file changed

+15
-26
lines changed

1 file changed

+15
-26
lines changed

cmd/arduino-app-cli/system/system.go

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -134,36 +134,24 @@ func newCleanUpCmd(cfg config.Configuration, docker command.Cli) *cobra.Command
134134
RunE: func(cmd *cobra.Command, _ []string) error {
135135
staticStore := servicelocator.GetStaticStore()
136136

137-
<<<<<<< HEAD
138137
feedback.Info("Running cleanup...")
139-
result, err := orchestrator.SystemCleanupSoft(cmd.Context(), cfg, staticStore, docker)
140-
=======
141-
feedback.Printf("Running cleanup...")
142138
result, err := orchestrator.SystemCleanup(cmd.Context(), cfg, staticStore, docker)
143-
>>>>>>> origin/main
144139
if err != nil {
145140
return err
146141
}
147142

148-
<<<<<<< HEAD
149-
if result > 0 {
150-
feedback.Info(fmt.Sprintf("Cleanup successful. Freed up %d bytes of disk space.", result))
151-
} else {
152-
feedback.Info("No removable images found.")
153-
=======
154143
if result.IsEmpty() {
155-
feedback.Print("Nothing to clean up.")
144+
feedback.Info("Nothing to clean up.")
156145
return nil
157-
>>>>>>> origin/main
158146
}
159147

160-
feedback.Print("Cleanup successful.")
161-
feedback.Print("Freed up")
148+
feedback.Info("Cleanup successful.")
149+
feedback.Info("Freed up")
162150
if result.RunningAppRemoved {
163-
feedback.Print(" - 1 running app")
151+
feedback.Info(" - 1 running app")
164152
}
165-
feedback.Printf(" - %d containers", result.ContainersRemoved)
166-
feedback.Printf(" - %d images (%v)", result.ImagesRemoved, x.ToHumanMiB(result.SpaceFreed))
153+
feedback.Info(fmt.Sprintf(" - %d containers", result.ContainersRemoved))
154+
feedback.Info(fmt.Sprintf(" - %d images (%v)", result.ImagesRemoved, x.ToHumanMiB(result.SpaceFreed)))
167155
return nil
168156
},
169157
}
@@ -182,20 +170,20 @@ func newNetworkMode() *cobra.Command {
182170
return fmt.Errorf("failed to enable network mode: %w", err)
183171
}
184172

185-
feedback.Printf("network mode enabled and started")
173+
feedback.Info("network mode enabled and started")
186174
case "disable":
187175
if err := board.DisableNetworkMode(cmd.Context(), &local.LocalConnection{}); err != nil {
188176
return fmt.Errorf("failed to disable network mode: %w", err)
189177
}
190-
feedback.Printf("network mode disabled and stopped")
178+
feedback.Info("network mode disabled and stopped")
191179
case "status":
192180
if isEnabled, err := board.NetworkModeStatus(cmd.Context(), &local.LocalConnection{}); err != nil {
193181
return fmt.Errorf("failed to check network mode status: %w", err)
194182
} else {
195183
if isEnabled {
196-
feedback.Printf("enabled")
184+
feedback.Info("enabled")
197185
} else {
198-
feedback.Printf("disabled")
186+
feedback.Info("disabled")
199187
}
200188
}
201189
}
@@ -218,15 +206,16 @@ func newkeyboardSet() *cobra.Command {
218206
}
219207

220208
if len(args) == 0 {
221-
feedback.Printf("available layouts:")
209+
feedback.Info("available layouts:")
222210
for _, l := range layouts {
223-
feedback.Printf(" - %s: %s", l.LayoutId, l.Description)
211+
feedback.Info(fmt.Sprintf(" - %s: %s", l.LayoutId, l.Description))
224212
}
225213
layout, err := board.GetKeyboardLayout(cmd.Context(), &local.LocalConnection{})
226214
if err != nil {
227215
return fmt.Errorf("failed to get keyboard layout: %w", err)
216+
228217
}
229-
feedback.Printf("\ncurrent layout: %s", layout)
218+
feedback.Info(fmt.Sprintf("\ncurrent layout: %s", layout))
230219
} else {
231220
layout := args[0]
232221

@@ -239,7 +228,7 @@ func newkeyboardSet() *cobra.Command {
239228
if err := board.SetKeyboardLayout(cmd.Context(), &local.LocalConnection{}, layout); err != nil {
240229
return fmt.Errorf("failed to set keyboard layout: %w", err)
241230
}
242-
feedback.Printf("keyboard layout set to %s", layout)
231+
feedback.Info(fmt.Sprintf("keyboard layout set to %s", layout))
243232
}
244233

245234
return nil

0 commit comments

Comments
 (0)