Skip to content

eval $(chef shell init zsh) produces unsightly warnings #3103

@trickyearlobe

Description

@trickyearlobe

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UntriagedAn issue that has yet to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions