Skip to content

Commit

Permalink
Fix check for 32-bit installs.
Browse files Browse the repository at this point in the history
Force a boolean comparison of the $ENV:XXX values, which are actually strings.
The boolean rules are very strange in PowerShell.

Closes #6.

Co-authored-by: lebarsfa <fabrice.le_bars@ensta-bretagne.org>
  • Loading branch information
jmcker and lebarsfa committed Mar 18, 2023
1 parent 4fc8577 commit 56b8620
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cfssl/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $targets = [Ordered]@{
if (Test-ProcessAdminRights) {
$parentFolder = "${ENV:PROGRAMFILES}"
$pathType = "Machine"
if (${ENV:OS_IS64BIT} -And ${ENV:ChocolateyForceX86}) {
if (${ENV:OS_IS64BIT} -Eq $true -And -Not (${ENV:ChocolateyForceX86} -Eq $true)) {
$parentFolder = "${ENV:PROGRAMFILES(x86)}"
}
}
Expand Down
2 changes: 1 addition & 1 deletion gstreamer/tools/chocolateyBeforeModify.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if (${nameSplit}.Length -gt 1 -and ${nameSplit}[1] -ne "devel") {

# ENV:ChocolateyForceX86 appears to never be set for uninstall
# No --x86 flag exists on the command
if (${ENV:OS_IS64BIT} -And -Not ${ENV:ChocolateyForceX86}) {
if (${ENV:OS_IS64BIT} -Eq $true -And -Not (${ENV:ChocolateyForceX86} -Eq $true)) {
$pathForUninstall = "%GSTREAMER_1_0_ROOT_$(${toolchain}.ToUpper())_X86_64%\bin"
} else {
$pathForUninstall = "%GSTREAMER_1_0_ROOT_$(${toolchain}.ToUpper())_X86%\bin"
Expand Down
2 changes: 1 addition & 1 deletion gstreamer/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ $packageArgs = @{

Install-ChocolateyPackage @packageArgs

if (${ENV:OS_IS64BIT} -And -Not ${ENV:ChocolateyForceX86}) {
if (${ENV:OS_IS64BIT} -Eq $true -And -Not (${ENV:ChocolateyForceX86} -Eq $true)) {
$locationVarName = "GSTREAMER_1_0_ROOT_$(${toolchain}.ToUpper())_X86_64"
} else {
$locationVarName = "GSTREAMER_1_0_ROOT_$(${toolchain}.ToUpper())_X86"
Expand Down
2 changes: 1 addition & 1 deletion libsndfile/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $url64 = "https://github.com/libsndfile/libsndfile/releases/download/${
if (Test-ProcessAdminRights) {
$parentFolder = "${ENV:PROGRAMFILES}"
$pathType = "Machine"
if (${ENV:OS_IS64BIT} -And ${ENV:ChocolateyForceX86}) {
if (${ENV:OS_IS64BIT} -Eq $true -And -Not (${ENV:ChocolateyForceX86} -Eq $true)) {
$parentFolder = "${ENV:PROGRAMFILES(x86)}"
}
}
Expand Down

0 comments on commit 56b8620

Please sign in to comment.