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

chef shell-init emits warnings #219

Open
nvwls opened this issue Feb 14, 2023 · 1 comment
Open

chef shell-init emits warnings #219

nvwls opened this issue Feb 14, 2023 · 1 comment
Labels
Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected.

Comments

@nvwls
Copy link

nvwls commented Feb 14, 2023

Version:

Chef Workstation version: 23.2.1028
Cookstyle version: 7.32.1
Chef Infra Client version: 18.0.185
Chef InSpec version: 5.18.14
Chef CLI version: 5.6.8
Chef Habitat version: 1.6.521
Test Kitchen version: 3.5.0

Environment:

Running on el8

Scenario:

Using chef-workstation in our jenkins pipeline to test cookbooks. While these are just warnings, it does produce noise in our builds.

Steps to Reproduce:

eval "$(chef shell-init bash)"

Expected Result:

No output

Actual Result:

$ eval "$(chef shell-init bash)"
/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.
@nvwls nvwls added Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected. labels Feb 14, 2023
@aye2002
Copy link

aye2002 commented Feb 24, 2023

This change seems to have worked:

$ diff shell_init.rb /tmp/shell_init.rb
125c125
<         erb = ERB.new(File.read(completion_template_path), nil, "-")
---
>         erb = ERB.new(File.read(completion_template_path), trim_mode: '-')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

2 participants