From fedcf86b8796ec9f5fe23dfc748e81708744da6b Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 3 Jul 2024 11:37:31 -0400 Subject: [PATCH] disk: Also pass stdin to install container It's only by doing this that we end up calling into the code inside `attach()` that tries to ensure the terminal size matching. Otherwise we just get the default of 80 columns (and no dynamic SIGWINCH resizing). This fixes the output in https://github.com/containers/bootc/pull/655 Signed-off-by: Colin Walters --- pkg/bootc/bootc_disk.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/bootc/bootc_disk.go b/pkg/bootc/bootc_disk.go index 75c36ed..d8f27c7 100644 --- a/pkg/bootc/bootc_disk.go +++ b/pkg/bootc/bootc_disk.go @@ -342,7 +342,7 @@ func (p *BootcDisk) runInstallContainer(quiet bool, config DiskImageConfig) (err var exitCode int32 if !quiet { attachOpts := new(containers.AttachOptions).WithStream(true) - if err := containers.Attach(attachCancelCtx, p.bootcInstallContainerId, nil, os.Stdout, os.Stderr, nil, attachOpts); err != nil { + if err := containers.Attach(attachCancelCtx, p.bootcInstallContainerId, os.Stdin, os.Stdout, os.Stderr, nil, attachOpts); err != nil { return fmt.Errorf("attaching: %w", err) } }