Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion core/commands/dag/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,11 @@ pin each individual root specified in the car headers, before GC runs again.
cmds.BoolOption(pinRootsOptionName, "Pin optional roots listed in the .car headers after importing.").WithDefault(true),
},
PreRun: func(req *cmds.Request, env cmds.Environment) error {
if silent, _ := req.Options[silentOptionName].(bool); silent {
silent, _ := req.Options[silentOptionName].(bool)
encType, _ := req.Options[cmds.EncLong].(string)

// force-disable progress unless on non-silent CLI
if silent || encType != "text" {
req.Options[progressOptionName] = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I ask for progress but set the encoding type to json, I'd expect json progress updates. I wouldn't mess with this in pre-run.

}

Expand Down