package-validator
package-validator copied to clipboard
[Requirement] Do not unzip into chocolatey\bin directly
This is bad because it could just overwrite files and put lots of junk files and folders here. This directory is controlled by Chocolatey and has an API for placing files here - that is through https://chocolatey.org/docs/helpers-install-bin-file if they don't automatically end up in here.
$packageArgs = @{
packageName = $env:ChocolateyPackageName
unzipLocation = "C:\ProgramData\chocolatey\bin"
url = $url
checksum = 'asdfasdf'
checksumType = 'sha256'
}
Install-ChocolateyZipPackage @packageArgs
This should be expanded to ensure that nothing is copied to that folder either.