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
if (-not ($chocoCmd=Get-Command'choco.exe'-CommandType 'Application'-ErrorAction 'SilentlyContinue'))
Otherwise, if (for instance) something modifies your Env:PATH and appends the chocolatey path a second time ...
Let's say, hypothetically, that one of these has extra slashes, or the wrong slashes or a slash on the end:
Whenever you use Get-Command to find a command, you must ensure that you only get one result back.
Chocolatey/source/public/Install-ChocolateyPackage.ps1
Line 300 in bd094df
Otherwise, if (for instance) something modifies your Env:PATH and appends the chocolatey path a second time ...
Let's say, hypothetically, that one of these has extra slashes, or the wrong slashes or a slash on the end:
Chocolatey/source/public/Install-ChocolateySoftware.ps1
Lines 271 to 274 in bd094df
You'll end up getting the error " The term 'choco.exe choco.exe' is not recognized as a name of a cmdlet" down here:
Chocolatey/source/public/Install-ChocolateyPackage.ps1
Line 327 in bd094df
The text was updated successfully, but these errors were encountered: