mirror of
https://github.com/containers/podman.git
synced 2025-06-26 21:07:02 +08:00
cmd, push: use the configured compression format
[NO NEW TESTS NEEDED] I am just changing the default value Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -306,8 +306,16 @@ func (ir *ImageEngine) Push(ctx context.Context, source string, destination stri
|
||||
pushOptions.SignBy = options.SignBy
|
||||
pushOptions.InsecureSkipTLSVerify = options.SkipTLSVerify
|
||||
|
||||
if options.CompressionFormat != "" {
|
||||
algo, err := compression.AlgorithmByName(options.CompressionFormat)
|
||||
compressionFormat := options.CompressionFormat
|
||||
if compressionFormat == "" {
|
||||
config, err := ir.Libpod.GetConfigNoCopy()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
compressionFormat = config.Engine.CompressionFormat
|
||||
}
|
||||
if compressionFormat != "" {
|
||||
algo, err := compression.AlgorithmByName(compressionFormat)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user