Only dump pull status in debug

This commit is contained in:
Dane Everitt 2019-12-28 15:14:56 -08:00
parent 5350a2d5a5
commit 5c3823de9a
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -11,7 +11,6 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/pterodactyl/wings/api" "github.com/pterodactyl/wings/api"
"go.uber.org/zap" "go.uber.org/zap"
"io"
"io/ioutil" "io/ioutil"
"os" "os"
"path/filepath" "path/filepath"
@ -120,9 +119,13 @@ func (ip *InstallationProcess) pullInstallationImage() error {
return errors.WithStack(err) return errors.WithStack(err)
} }
// Copy to stdout until we hit an EOF or other fatal error which would // Block continuation until the image has been pulled successfully.
// require exiting. scanner := bufio.NewScanner(r)
if _, err := io.Copy(os.Stdout, r); err != nil && err != io.EOF { for scanner.Scan() {
zap.S().Debugw(scanner.Text())
}
if err := scanner.Err(); err != nil {
return errors.WithStack(err) return errors.WithStack(err)
} }