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

eval $(chef shell init zsh) produces unsightly warnings

Open trickyearlobe opened this issue 2 years ago • 3 comments

Description

Nothing serious... just embarrassing on a screen share. When I launch a terminal window I get the following warnings

/opt/chef-workstation/embedded/lib/ruby/gems/3.1.0/gems/chef-cli-5.6.8/lib/chef-cli/command/shell_init.rb:125: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
/opt/chef-workstation/embedded/lib/ruby/gems/3.1.0/gems/chef-cli-5.6.8/lib/chef-cli/command/shell_init.rb:125: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.

In my .zshrc I run eval "$(chef shell-init zsh)"

Chef version: chef-workstation-23.4.1032-1.arm64.dmg OS Version: Ventura 13.3.1 ZSH Version: zsh 5.9 (arm-apple-darwin22.1.0) oh-my-zsh: b4f9698 Hardware: MBP with Apple Silicon M2

Originally raised with the CINC team, but seems it's actually in upstream Chef https://gitlab.com/cinc-project/distribution/workstation/-/issues/29

trickyearlobe avatar Apr 21 '23 09:04 trickyearlobe

Looks like it's fixed in chef-cli-5.6.11.

aye2002 avatar Apr 26 '23 18:04 aye2002

@aye2002 that should be included in the next release of workstation correct?

ramereth avatar Apr 27 '23 19:04 ramereth

yes, this change is in chef-cli-5.6.11 and will be included in the upcoming workstation release.

nikhil2611 avatar May 02 '23 11:05 nikhil2611