chocolatey-misc-helpers: Start-WaitAndStop remake#364
Open
virginviolet wants to merge 11 commits intobcurran3:masterfrom
Open
chocolatey-misc-helpers: Start-WaitAndStop remake#364virginviolet wants to merge 11 commits intobcurran3:masterfrom
virginviolet wants to merge 11 commits intobcurran3:masterfrom
Conversation
Owner
|
Hi @virginviolet. First thanks for finding this and wanting to make it better. I put a few comments in on two of the files. I only put a few minutes into looking at this but will look at it deeper in the future and after you've seen my comments. |
Author
|
Thanks. |
Author
|
For the record, I just discovered that core-extentions has a helper that addresses the same issue as Start-WaitAndStop. Remove-Process, that is. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I had the issue of
Start-WaitAndStoponly working if the process appeared within 10 seconds (the timer set in Start-WaitAndStop.ps1). So I remade the functions my way.It bothered me also that, even when you got the function working as intended, the
** Stopping $ProcessName process...message would not appear, as it's executed in an isolated environment (as I understand it). Granted, I haven't tried it in an actual Chocolatey install, so maybe I could be wrong.To address this, I added a Warning message in
Start-WaitAndStop.ps1that saysWaiting to stop '$ProcessName'....I also created a new function,
Receive-WaitAndStopthat grabs the output from Start-WaitAndStopActual. I don't know when this would ever be useful, but here is how you could use it.Other changes:
Start-WaitAndStop -Seconds 600(Default is300).-Interval 2(default is now3).