facebook / chef-utils

Utilities related to Chef

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

erikng opened this issue · 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.

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?

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.

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

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.

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