Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
erikng opened this issue Jun 3, 2020 · 6 comments
Open

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

erikng opened this issue Jun 3, 2020 · 6 comments
Assignees

Comments

@erikng
Copy link

erikng commented Jun 3, 2020

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.

@jaymzh
Copy link
Collaborator

jaymzh commented Jun 3, 2020

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
Copy link
Collaborator

jaymzh commented Jun 3, 2020

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
Copy link
Collaborator

jaymzh commented Jun 3, 2020

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

@erikng
Copy link
Author

erikng commented Jun 3, 2020

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.

@jaymzh
Copy link
Collaborator

jaymzh commented Jun 3, 2020

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

@NaomiReeves NaomiReeves self-assigned this Jun 3, 2020
@erikng
Copy link
Author

erikng commented Jun 3, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants