chef-utils icon indicating copy to clipboard operation
chef-utils copied to clipboard

chefctl on Chef 16 on macos does not result in colored output

Open erikng opened this issue 4 years ago • 6 comments

I'm at a loss on this one, but I've noticed that chefctl does not result in colored output when using Chef 16 (Chef Infra Client: 16.1.16)

After attaching some debugging I've confirmed that sudo chefctl -icH is equivalent to sudo /opt/chef/bin/chef-client -l fatal -F doc --no-fork.

The only thing I can come up with is the ruby /opt/chef/embedded/bin/ruby has updated some gems that are prohibiting this behavior or have simply changed.

erikng avatar Jun 03 '20 17:06 erikng

My guess is that Chef is doing more work to determine when it's output is being piped, and because we're a pipe it's going "aw shit, best not send colors!" If you update your chefctl config and add --color to your chef-client opts, does that work?

jaymzh avatar Jun 03 '20 17:06 jaymzh

btw, I'm keeping up with bleeding edge 15 but have not started testing 16 yet, mostly because I'm still watching the fun string of bugs and bugfixes :) I'll probably try out 16 in a month or so.

jaymzh avatar Jun 03 '20 17:06 jaymzh

(also, for the purposes of testing, chefctl -i -- --color will work)

jaymzh avatar Jun 03 '20 17:06 jaymzh

chefctl -i -- --color does not seem to work for me. I also force changed color to true in the chefctl.rb file itself before posting this and it had not effect.

erikng avatar Jun 03 '20 18:06 erikng

Interesting. I'm happy to setup 16 somewhere, but I don't have access to osx. Is this reproducible on linux?

jaymzh avatar Jun 03 '20 18:06 jaymzh

I haven't tried on Linux yet since we haven't started testing chef 16 on non-macOS.

Thanks, Erik Gomez


From: Phil Dibowitz [email protected] Sent: Wednesday, June 3, 2020 1:16:21 PM To: facebook/chef-utils [email protected] Cc: Erik Gomez [email protected]; Author [email protected] Subject: Re: [facebook/chef-utils] chefctl on Chef 16 on macos does not result in colored output (#78)

Interesting. I'm happy to setup 16 somewhere, but I don't have access to osx. Is this reproducible on linux?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/facebook/chef-utils/issues/78#issuecomment-638373297, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABLL6GA77WJYK2S6ENP46PDRU2HPLANCNFSM4NR3K6AA.

erikng avatar Jun 03 '20 21:06 erikng