Pass io.Writer when pushing images/manifests from command line
[NO NEW TESTS NEEDED] Signed-off-by: Vladimir Kochnev <hashtable@yandex.ru>
This commit is contained in:
parent
e48681e600
commit
ec9508ea17
|
@ -164,6 +164,10 @@ func imagePush(cmd *cobra.Command, args []string) error {
|
|||
pushOptions.Password = creds.Password
|
||||
}
|
||||
|
||||
if !pushOptions.Quiet {
|
||||
pushOptions.Writer = os.Stderr
|
||||
}
|
||||
|
||||
if err := common.PrepareSigningPassphrase(&pushOptions.ImagePushOptions, pushOptions.SignPassphraseFileCLI); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/containers/common/pkg/auth"
|
||||
"github.com/containers/common/pkg/completion"
|
||||
|
@ -122,6 +123,10 @@ func push(cmd *cobra.Command, args []string) error {
|
|||
manifestPushOpts.Password = creds.Password
|
||||
}
|
||||
|
||||
if !manifestPushOpts.Quiet {
|
||||
manifestPushOpts.Writer = os.Stderr
|
||||
}
|
||||
|
||||
if err := common.PrepareSigningPassphrase(&manifestPushOpts.ImagePushOptions, manifestPushOpts.SignPassphraseFileCLI); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue