You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the last elseif statement of the generated chocolateyuninstall.ps1 script it generates the following:
} elseif ($key.Count-gt1) {
Write-Warning"$key.Count matches found!"Write-Warning"To prevent accidental data loss, no programs will be uninstalled."Write-Warning"Please alert package maintainer the following keys were matched:"$key|% {Write-Warning"- $_.DisplayName"}
}
Expected the template to be generated with wrapping the calls to $key.Count and $_.DisplayName within parenthesis like this:
} elseif ($key.Count-gt1) {
Write-Warning"$($key.Count) matches found!"Write-Warning"To prevent accidental data loss, no programs will be uninstalled."Write-Warning"Please alert package maintainer the following keys were matched:"$key|% {Write-Warning"- $($_.DisplayName)"}
}
How Did You Get This To Happen? (Steps to Reproduce)
Run choco new temporary and look inside the chocolateyuninstall.ps1 file.
Output Log
No log available for this.
The text was updated successfully, but these errors were encountered:
ferventcoder
changed the title
choco new generates uninstall template with wrong use of a variables
choco new generates uninstall template with wrong use of registry key variable
May 30, 2017
gep13
changed the title
choco new generates uninstall template with wrong use of registry key variablechoco new generates uninstall template with wrong use of registry key variable
Apr 25, 2023
What You Are Seeing?
In the last
elseif
statement of the generated chocolateyuninstall.ps1 script it generates the following:Which will output the the full keys and append
.Count
/.DisplayName
instead of outputting the Count, or the display name of the key.This can be seen from the following appveyor build:
https://ci.appveyor.com/project/chocolatey/chocolatey-coreteampackages/build/1778-yqtgkmnh#L197
What is Expected?
Expected the template to be generated with wrapping the calls to
$key.Count
and$_.DisplayName
within parenthesis like this:How Did You Get This To Happen? (Steps to Reproduce)
Run
choco new temporary
and look inside thechocolateyuninstall.ps1
file.Output Log
No log available for this.
The text was updated successfully, but these errors were encountered: