Skip to content

Commit 5312ba9

Browse files
committed
Remove unused wait group
The 'WaitForSSHToBeReady()' call will make it to wait until the VM is ready, to stop printing the console. Signed-off-by: German Maglione <[email protected]>
1 parent 99db38c commit 5312ba9

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

cmd/run.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"errors"
66
"fmt"
77
"os"
8-
"sync"
98
"time"
109

1110
"github.com/containers/podman-bootc/pkg/bootc"
@@ -159,8 +158,6 @@ func doRun(flags *cobra.Command, args []string) error {
159158

160159
if !vmConfig.Background {
161160
if !vmConfig.Quiet {
162-
var vmConsoleWg sync.WaitGroup
163-
vmConsoleWg.Add(1)
164161
go func() {
165162
err := bootcVM.PrintConsole()
166163
if err != nil {
@@ -173,8 +170,6 @@ func doRun(flags *cobra.Command, args []string) error {
173170
return fmt.Errorf("WaitSshReady: %w", err)
174171
}
175172

176-
vmConsoleWg.Done() //stop printing the VM console when SSH is ready
177-
178173
// the PrintConsole routine is suddenly stopped without waiting for
179174
// the print buffer to be flushed, this can lead to the consoel output
180175
// printing after the ssh prompt begins. Sleeping for a second

0 commit comments

Comments
 (0)