diff --git a/cmd/run.go b/cmd/run.go index 021a2ac3..b2bf7f70 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -5,7 +5,6 @@ import ( "errors" "fmt" "os" - "sync" "time" "github.com/containers/podman-bootc/pkg/bootc" @@ -159,8 +158,6 @@ func doRun(flags *cobra.Command, args []string) error { if !vmConfig.Background { if !vmConfig.Quiet { - var vmConsoleWg sync.WaitGroup - vmConsoleWg.Add(1) go func() { err := bootcVM.PrintConsole() if err != nil { @@ -173,8 +170,6 @@ func doRun(flags *cobra.Command, args []string) error { return fmt.Errorf("WaitSshReady: %w", err) } - vmConsoleWg.Done() //stop printing the VM console when SSH is ready - // the PrintConsole routine is suddenly stopped without waiting for // the print buffer to be flushed, this can lead to the consoel output // printing after the ssh prompt begins. Sleeping for a second