PSResourceGet icon indicating copy to clipboard operation
PSResourceGet copied to clipboard

Add -TemporaryPath parameter to Install-PSResource, Save-PSResource, and Update-PSResource

Open alyssa1303 opened this issue 3 years ago • 2 comments

PR Summary

This PR adds a parameter called -TemporaryPath for Install-PSResource, Save-PSResource, and Update-PSResource cmdlets, which allows users to set the directory for temporary installation.

PR Context

Resolves #650

PR Checklist

alyssa1303 avatar Aug 16 '22 17:08 alyssa1303

I also noticed that the InstallHelper class is derived from PSCmdlet, and this is incorrect because it is not being processed as a PowerShell cmdlet. I think this was done so that the PSCmdlet ThrowTerminatingError() and WriteError() methods could be called. But this is incorrect (and I am not sure what the behavior is). InstallHelper should throw a normal C# exceptions and the top level cmdlets should catch and rethrow. Also InstallHelper should return a string[] for any errors to be reported by the top level cmdlet.

@alyssa1303 Can you make these changes, or create a new Issue to make these changes later (since this is not really in scope of this PR)?

I think creating an issue for that (and a separate PR) would be better.

anamnavi avatar Aug 17 '22 17:08 anamnavi

I created an issue #767

alyssa1303 avatar Aug 17 '22 19:08 alyssa1303