Skip to content
This repository has been archived by the owner on Feb 19, 2019. It is now read-only.

Fixes issue I had with ExitCode not being set #517

Closed

Conversation

JakeGinnivan
Copy link

http://connect.microsoft.com/PowerShell/feedback/details/774903/powershell-3-0-start-process-disregards-wait-parameter-when-invoked-remotely
Seems to be related to this Connect issue, workaround listed fixed my issue

The error I was getting was:

DEBUG: 7za exit code:
Write-Error : GitReleaseNotes did not finish successfully. Boo to the chocolatey gods!
-----------------------
[ERROR] 7-Zip signalled an unknown error (code )
-----------------------
At C:\ProgramData\chocolatey\chocolateyinstall\helpers\functions\Write-ChocolateyFailure.ps1:30 char:3
+   Write-Error $errorMessage
+   ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error

Which shows the exit code is not being set so the error is being raised

@JakeGinnivan
Copy link
Author

Hrrm, actually that function is only powershell 3.0. Is there a way to only execute that if the version of powershell is >= 3.0?

@ferventcoder
Copy link
Contributor

This is a duplicate of #516

@JakeGinnivan JakeGinnivan deleted the UnzipIssue branch July 11, 2014 13:30
@JakeGinnivan
Copy link
Author

Ah, sorry about that, didn't even check

@jberezanski
Copy link
Contributor

Hrrm, actually that function is only powershell 3.0.

Huh?

D:\>powershell -version 2 gcm wait-process
CommandType     Name                                               ModuleName
-----------     ----                                               ----------
Cmdlet          Wait-Process                                       Microsoft.PowerShell.Management

@ferventcoder
Copy link
Contributor

It's there in 2.0, but the documentation on MSDN is misleading. Since it is a bug with 3+, I made sure we didn't hit some infinite loop waiting.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants