-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Remove Persist parameter from New-PSDrive on non-Windows platform
#8291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I think a right fix is to remove the parameter on Unix-s. |
|
Interesting. I hadn't considered that. First thoughts on the effects of removing the parameter on non-Windows platforms. That would entirely prevent However, suppose someone writes a script calling I think the In terms of implementation, I think removing the parameter would require wrapping the What do you think? |
|
We already have an experience with removing unsupported cmdlets and parameters on Unix platforms. User will get "A parameter cannot be found ..." error that looks good. See #4922 - implemented after the comment #4897 (comment) |
|
Perfect example to follow 👌 Thank you. |
New-PSDrive -Persist used on non-Windows platformPersist parameter from New-PSDrive -Persist on non-Windows platform
Persist parameter from New-PSDrive -Persist on non-Windows platformPersist parameter from New-PSDrive on non-Windows platform
Persist parameter from New-PSDrive on non-Windows platformPersist parameter from New-PSDrive on non-Windows platform
src/Microsoft.PowerShell.Commands.Management/commands/management/Navigation.cs
Outdated
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Management/PSDrive.Tests.ps1
Outdated
Show resolved
Hide resolved
|
@lukexjeremy In next time please don't put your commits in master branch - create a new work branch for every new PR. |
|
Darn. Will fix those failing checks later today. |
src/Microsoft.PowerShell.Commands.Management/commands/management/Navigation.cs
Outdated
Show resolved
Hide resolved
|
@lukexjeremy Please open new issue in https://github.com/PowerShell/PowerShell-Docs to document the change. And add here new empty commit with |
|
@lukexjeremy Please reopen the PR and we will merge. |
|
👍 |
`Persist` is only supported on Windows.
* Make it clear that persist is being set to false on UNIX * Use Pester's `-Skip` parameter instead of if statement to skip test
|
@lukexjeremy You removed commits. Could you restore your branch? |
|
@lukexjeremy Thanks for your contribution! Come back with new contributions! |
|
Thanks for your help too. Will do and looking forward to the next contribution. |
|
You could look issues with Up-for-Grabs. Also we have an issue to hide parameters and cmdlets which is not still implemented on Unix. There are more such examples. |
PR Summary
Remove the
Persistparameter ofNew-PSDriveon non-Windows platforms, since the option is only supported on Windows.Fix #8250.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests