diff --git a/builder/chroot.go b/builder/chroot.go index b22fe7d..017ec22 100644 --- a/builder/chroot.go +++ b/builder/chroot.go @@ -24,6 +24,10 @@ import ( "github.com/getsolus/libosdev/commands" ) +func init() { + commands.SetStderr(os.Stdout) +} + // Chroot will attempt to spawn a chroot in the overlayfs system. func (p *Package) Chroot(notif PidNotifier, pman *EopkgManager, overlay *Overlay) error { slog.Debug("Beginning chroot", "profile", overlay.Back.Name, "version", p.Version, diff --git a/builder/util.go b/builder/util.go index 4a66bbf..ea69351 100644 --- a/builder/util.go +++ b/builder/util.go @@ -192,7 +192,7 @@ func ChrootExec(notif PidNotifier, dir, command string) error { args := []string{dir, "/bin/sh", "-c", command} c := exec.Command("chroot", args...) c.Stdout = os.Stdout - c.Stderr = os.Stderr + c.Stderr = os.Stdout c.Stdin = nil c.Env = ChrootEnvironment c.SysProcAttr = &syscall.SysProcAttr{Setsid: true} @@ -212,7 +212,7 @@ func ChrootExecStdin(notif PidNotifier, dir, command string) error { args := []string{dir, "/bin/sh", "-c", command} c := exec.Command("chroot", args...) c.Stdout = os.Stdout - c.Stderr = os.Stderr + c.Stderr = os.Stdout c.Stdin = os.Stdin c.Env = ChrootEnvironment diff --git a/cli/init.go b/cli/init.go index 68edd50..3d64ce6 100644 --- a/cli/init.go +++ b/cli/init.go @@ -33,6 +33,7 @@ import ( ) func init() { + commands.SetStderr(os.Stdout) cmd.Register(&Init) cmd.Register(&cmd.Help) }