Closed JefeDavis closed 2 years ago
Hiyo!
Good catch, makes sense to me. Leaving this open for another day or two, will merge if there are no objections.
Cheers!
Thanks man! I also added support for modules with powercli dependencies in runspaces, usually it errors out saying the drives are already in use, reimporting does the trick for some reason
Hey there! Wondering if we can get this merged soon
Hiyo! Sorry, I’m slow!
On a phone, my only concern was how PowerShell handles types in catch statements. Would that cause any trouble in a system without PowerCLI (or whatever module that comes from), in the odd event that it errored and hit the catch? Will do a quick test early this week if I find time!
My reasoning was that the catch just retries the import again which if for some reason that didn't work, it would fail to import the module and error out the same way it does now. And the catch itself is tied to the specific exception of drives being already in use, so if another module has that same issue this fix would either work for them or they would be in the same situation as they already are
Hey there! Just wondering if there's any update, waiting on these changes for my build pipeline
Hey @RamblingCookieMonster just wanted to know if this can be merged soon, I'd like to start using it in my pipeline but it's unusable without this fix
Hiyo! Yeah, figured this would be the case - if a system doesn't have PowerCLI, that code will complain if any error is thrown, given that VMware.VimAutomation.ViCore.Cmdlets.Provider.Exceptions.DriveException
doesn't exist.
Feel free to submit the PR without that error handling, or with modified error handling that detects $_
s type name in the catch block (not with the built in language, just use an if statement or something like that), and runs again if it was VMware.VimAutomation.ViCore.Cmdlets.Provider.Exceptions.DriveException
.
Cheers!
Something like that?
looks like AppVeyor is having some issues
Closer! That still fails - instead of using types, just need to use strings, e.g. something like this might work in the catch block:
$_.gettype().fullname -eq 'VMware.VimAutomation.ViCore.Cmdlets.Provider.Exceptions.DriveException'
I think i have it now, what do you think?
Hey there! Any chance we can merge this?
Hey there! Any update on if we can merge this?
Hey @RamblingCookieMonster, Just wondering if we can merge this now?
This commit would allow Invoke-Git to be used with PSDrives and network drives