AnthonyMastrean / chocolateypackages

Application packages for Windows
https://chocolatey.org/profiles/AnthonyMastrean
18 stars 63 forks source link

intellijidea-community installing to "Program Files (x86)" even on 64-bit system #343

Open gregma opened 5 years ago

gregma commented 5 years ago

This package seems to be trying to determine of it's being run on a 64-bit machine, but setting the install directory to the 32-bit Program Files if it is.

$programFiles = (${env:ProgramFiles(x86)}, ${env:ProgramFiles} -ne $null)[0]

If this is being run on a 64-bit machine, this line will return "Program Files (x86)" which is then set as $programFiles. This should not be correct. If the system is 64-bit, it should be installed to "Program Files".

AnthonyMastrean commented 5 years ago

@ZeddG93 this is an interesting incantation; are you sure it works in all cases?

https://github.com/AnthonyMastrean/chocolateypackages/blame/master/packages/intellijidea-community/tools/chocolateyInstall.ps1#L7

zed76r commented 5 years ago

fix in next version https://github.com/ZeddG93/chocolateypackages/commit/22037c34a37f4bb5216d501abf0a83477bfcae40