Skip to content

Commit ef16820

Browse files
committed
refactoring
1 parent 1c30eba commit ef16820

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

internal/orchestrator/orchestrator.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ func stopAppWithCmd(ctx context.Context, docker command.Cli, app app.ArduinoApp,
401401
case "stop":
402402
message = fmt.Sprintf("Stopping app %q", app.Name)
403403
case "down":
404-
message = fmt.Sprintf("destroying app %q", app.Name)
404+
message = fmt.Sprintf("Destroying app %q", app.Name)
405405
}
406406

407407
if !yield(StreamMessage{data: message}) {
@@ -440,8 +440,8 @@ func stopAppWithCmd(ctx context.Context, docker command.Cli, app app.ArduinoApp,
440440
mainCompose := app.AppComposeFilePath()
441441
// In case the app was never started
442442
if mainCompose.Exist() {
443-
cmd := "docker"
444443
args := []string{
444+
"docker",
445445
"compose",
446446
"-f", mainCompose.String(),
447447
opts.Command,
@@ -453,8 +453,7 @@ func stopAppWithCmd(ctx context.Context, docker command.Cli, app app.ArduinoApp,
453453
if opts.RemoveOrphans {
454454
args = append(args, "--remove-orphans")
455455
}
456-
fullCommand := append([]string{cmd}, args...)
457-
process, err := paths.NewProcess(nil, fullCommand...)
456+
process, err := paths.NewProcess(nil, args...)
458457
if err != nil {
459458
yield(StreamMessage{error: err})
460459
return

0 commit comments

Comments
 (0)