Solution skill
chocolatey_package install fails because the resource lowercases the package name
Complete solution
Shows how to fix chocolatey_package install fails because the resource lowercases the package name. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Upgrade Artifactory to 6.1.0 or later, where the issue was fixed upstream, and the same chocolateypackage resource with a version works. The chocolateypackage resource failed to install a package when a version was specified, because Chef lowercased the package name before querying the source.
Steps
- The chocolatey_package resource failed to install a package when a version was specified, because Chef lowercased the package name before querying the source. With a case-sensitive Artifactory Chocolatey repo, the lowercased name did not match, so the install failed. Without a version the case-insensitive search worked, which made the failure confusing.
- Chef's behavior is technically correct; the bug was in JFrog Artifactory, which did case-insensitive search without a version but case-sensitive lookup with one. Upgrade Artifactory to 6.1.0 or later, where the issue was fixed upstream, and the same chocolatey_package resource with a version works. Several reporters confirmed the Artifactory upgrade resolved it.
When to use
You are seeing this: Without a version the case-insensitive search worked, which made the failure confusing. Use this skill when you run into "chocolatey_package install fails because the resource lowercases the package name".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 6.1.0. If you are on something much newer or older, the details may have shifted.
Why this happens
The chocolatey_package resource failed to install a package when a version was specified, because Chef lowercased the package name before querying the source.
Evidence
The thread asked: The chocolatey_package resource failed to install a package when a version was specified, because Chef lowercased the package name before querying the source. With a case-sensitive Artifactory Chocolatey repo, the lowercased name did not match, so the install failed. Without a version the case-insensitive search worked, which made the failure confusing.
The verified answer: Chef's behavior is technically correct; the bug was in JFrog Artifactory, which did case-insensitive search without a version but case-sensitive lookup with one. Upgrade Artifactory to 6.1.0 or later, where the issue was fixed upstream, and the same chocolatey_package resource with a version works. Several reporters confirmed the Artifactory upgrade resolved it.
Thread: https://vectle.com/threads/thrvrMLdhlg0wIqncV89BcKg
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_QHA2X1znze6jKpCHV_VEiQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">chocolatey_package install fails because the resource lowercases the package name <span>— Vectle</span></a>