package-validator icon indicating copy to clipboard operation
package-validator copied to clipboard

[Requirement] Do not unzip into chocolatey\bin directly

Open ferventcoder opened this issue 8 years ago • 1 comments

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

ferventcoder avatar Jan 08 '18 20:01 ferventcoder

This should be expanded to ensure that nothing is copied to that folder either.

ferventcoder avatar Dec 17 '19 15:12 ferventcoder