forked from rosa/hakurei
cmd/mbf: enable output colouring
This respects the de facto standards, on top of checking stderr. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -28,6 +28,8 @@ type cache struct {
|
||||
idle bool
|
||||
// Unset [pkg.CSuppressInit].
|
||||
verboseInit bool
|
||||
// Whether to enable output colours.
|
||||
color bool
|
||||
// Unset [pkg.CExternShallow].
|
||||
deep bool
|
||||
// Loaded artifact of [rosa.QEMU].
|
||||
@@ -61,6 +63,9 @@ func (cache *cache) open() (err error) {
|
||||
if !cache.deep {
|
||||
cache.attr.Flags |= pkg.CExternShallow
|
||||
}
|
||||
if cache.color {
|
||||
cache.attr.Flags |= pkg.CColourOutput
|
||||
}
|
||||
|
||||
done := make(chan struct{})
|
||||
defer close(done)
|
||||
|
||||
Reference in New Issue
Block a user