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

Get-ChocolateyUnzip fails due to Wait-Process exception #571

Closed
bennyhat opened this issue Sep 9, 2014 · 5 comments
Closed

Get-ChocolateyUnzip fails due to Wait-Process exception #571

bennyhat opened this issue Sep 9, 2014 · 5 comments

Comments

@bennyhat
Copy link

bennyhat commented Sep 9, 2014

For version 0.9.8.27 Get-ChocolateyUnzip fails to unzip with the following error:

"Wait-Process : Cannot find a process with the name "System.Diagnostics.Process (7za)". Verify the process name and call the cmdlet again."

This is fixed by replacing Wait-Process $process with Wait-Process -Id $process.id on line 83 of Get-ChocolateyUnzip.ps1

This is likely due to an older version of PowerShell?
Other Details:
Windows 7 64-bit
PSVersion 3.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.18063
BuildVersion 6.2.9200.16398
PSCompatibleVersions {1.0, 2.0, 3.0}
PSRemotingProtocolVersion 2.2

@bennyhat
Copy link
Author

bennyhat commented Sep 9, 2014

This also appears to affect other files that use Wait-Process, such as Chocolatey-Pack

@ferventcoder
Copy link
Contributor

Actually we put in a fix just to address a bug in PS v3 with not waiting processes...

@ferventcoder
Copy link
Contributor

It's possible it's something in there that is messed up? #516

@bennyhat
Copy link
Author

You are correct - 516 appears to be the same. My mistake! I need to improve my searching skills!

@ferventcoder
Copy link
Contributor

No, it appears #516 caused this issue :)

ferventcoder added a commit to ferventcoder/chocolatey that referenced this issue Nov 2, 2014
When waiting for a process to exit, use the id of the process as name may cause
errors if the name if is incorrect versus the actual process name. ID is
deterministic so should have less chance for error.
ferventcoder added a commit to ferventcoder/chocolatey that referenced this issue Nov 2, 2014
* stable:
  0.9.8.28-rc1
  (docs) updating changelog/release notes
  (chocolatey-archiveGH-577) use default credentials if available.
  (maint) add kickstarter message
  (chocolatey-archiveGH-558) quote path on batch fallback
  (chocolatey-archiveGH-571) Use process id instead of name
  (chocolatey-archiveGH-600) Give maintainer heads up about moderation
  (chocolatey-archiveGH-599) Restrict calls to choco.org to https

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

No branches or pull requests

2 participants