PSResourceGet
PSResourceGet copied to clipboard
Add -TemporaryPath parameter to Install-PSResource, Save-PSResource, and Update-PSResource
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
- [x] PR has a meaningful title
- Use the present tense and imperative mood when describing your changes
- [x] Summarized changes
- [x] Make sure all
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header - [x] This PR is ready to merge and is not Work in Progress.
- If the PR is work in progress, please add the prefix
WIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.
- If the PR is work in progress, please add the prefix
- Breaking changes
- [x] None
- OR
- [ ] Documentation needed
- [ ] Issue filed:
- User-facing changes
- [x] Not Applicable
- OR
- [ ] Documentation needed
- [ ] Issue filed:
- Testing - New and feature
- [x] N/A or can only be tested interactively
- OR
- [ ] Make sure you've added a new test if existing tests do not effectively test the code changed
- Tooling
- [ ] I have considered the user experience from a tooling perspective and don't believe tooling will be impacted.
- OR
- [ ] I have considered the user experience from a tooling perspective and enumerated concerns in the summary.
I also noticed that the
InstallHelperclass is derived fromPSCmdlet, and this is incorrect because it is not being processed as a PowerShell cmdlet. I think this was done so that the PSCmdletThrowTerminatingError()andWriteError()methods could be called. But this is incorrect (and I am not sure what the behavior is).InstallHelpershould throw a normal C# exceptions and the top level cmdlets should catch and rethrow. AlsoInstallHelpershould return astring[]for any errors to be reported by the top level cmdlet.@alyssa1303 Can you make these changes, or create a new
Issueto 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.
I created an issue #767