@@ -125,6 +125,8 @@ const (
125125 // AutoMode will choose TtyMode or PlainMode depending on if the output is
126126 // a tty.
127127 AutoMode DisplayMode = "auto"
128+ // QuietMode discards all output.
129+ QuietMode DisplayMode = "quiet"
128130 // TtyMode enforces the output is a tty and will otherwise cause an error if it isn't.
129131 TtyMode DisplayMode = "tty"
130132 // PlainMode is the human-readable plain text output. This mode is not meant to be read
@@ -152,11 +154,24 @@ func NewDisplay(out console.File, mode DisplayMode, opts ...DisplayOpt) (Display
152154 return newPlainDisplay (out , opts ... ), nil
153155 case RawJSONMode :
154156 return newRawJSONDisplay (out , opts ... ), nil
157+ case QuietMode :
158+ return newDiscardDisplay (), nil
155159 default :
156160 return Display {}, errors .Errorf ("invalid progress mode %s" , mode )
157161 }
158162}
159163
164+ type discardDisplay struct {}
165+
166+ func newDiscardDisplay () Display {
167+ return Display {disp : & discardDisplay {}}
168+ }
169+
170+ func (d * discardDisplay ) init (displayLimiter * rate.Limiter ) {}
171+ func (d * discardDisplay ) update (ss * client.SolveStatus ) {}
172+ func (d * discardDisplay ) refresh () {}
173+ func (d * discardDisplay ) done () {}
174+
160175type consoleDisplay struct {
161176 t * trace
162177 disp * ttyDisplay
0 commit comments