Skip to content

Commit

Permalink
redirect image pull progress to stderr instead of stdout
Browse files Browse the repository at this point in the history
Signed-off-by: Mrudul Harwani <[email protected]>
  • Loading branch information
mharwani committed Jun 30, 2023
1 parent d674b3b commit 61efde6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/nerdctl/image_pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func processPullCommandFlags(cmd *cobra.Command) (types.ImagePullOptions, error)
Unpack: unpackStr,
Quiet: quiet,
IPFSAddress: ipfsAddressStr,
Stdout: cmd.OutOrStdout(),
Stdout: cmd.OutOrStderr(),
}, nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/compose/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func New(client *containerd.Client, globalOptions types.GlobalCommandOptions, op
Mode: pullMode,
Unpack: nil,
Quiet: quiet,
ProgressHandler: jobs.DefaultStatusHandler(stdout),
ProgressHandler: jobs.DefaultStatusHandler(stderr),
}

// IPFS reference
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/container/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func Create(ctx context.Context, client *containerd.Client, args []string, netMa
HostsDir: options.GOptions.HostsDir,
Mode: options.Pull,
Quiet: false,
ProgressHandler: jobs.DefaultStatusHandler(options.ImagePullOpt.Stdout),
ProgressHandler: jobs.DefaultStatusHandler(options.Stderr),
}
ensuredImage, err = image.EnsureImage(ctx, client, rawRef, pullCfg, options.ImagePullOpt)
if err != nil {
Expand Down

0 comments on commit 61efde6

Please sign in to comment.