Skip to main content

ShellOutToChocolatey

The department is: ShellOutToChocolatey

The full name of the cop is: Chef/Modernize/ShellOutToChocolatey

Enabled by default Supports autocorrection Target Chef Version
Enabled No All Versions

Use the Chocolatey resources built into Chef Infra Client instead of shelling out to the choco command

powershell_script ‘add artifactory choco source’ do code “choco source add -n=artifactory -s=‘https://mycorp.jfrog.io/mycorp/api/nuget/chocolatey-remote' -u foo -p bar"x not_if ‘choco source list | findstr artifactory’ end

Examples

incorrect

execute 'install package foo' do
  command "choco install --source=artifactory \"foo\" -y --no-progress --ignore-package-exit-codes"
end

Configurable attributes

Name Default value Configurable values
Version Added 5.5.0 String
Include
Array

Was this page helpful?

×









Search Results