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
Change $PSNativeCommandArgumentPassing
to default to Legacy
on stable release and Windows
on previews
#18694
Comments
Also, when I do
I expect to script block to inherit passing behavior ( |
@inikulshin, this is a separate issue: script blocks that run in the context of background jobs know nothing about the caller's state (the only exception are environment variables); any such state must be recreated explicitly, as needed: ( |
With respect to the issue at hand:
|
Recently I hit an issue that makes me reconsider this change. I have a native command that accepts JSON as input to parameters. With |
@SteveL-MSFT, let us recap:
Based on your comment, it sounds like you're now considering retaining the half-broken behavior going forward.
See also: #18660 (comment) |
@mklement0 will bring this topic back up to the committee. Based on your proposal, we'll just stick with Legacy on Windows forever, which IS an option. |
@PowerShell/powershell-committee re-discussed this. We debated on whether we prioritize existing PowerShell users (primarily Windows-only) or for new/existing customers that may encounter issues with new commands that don't work with legacy mode and may not figure out how to escape properly. In short, we decided that we would prioritize cross-platform compat the future than WinPS compat and the past. One action item we will be taking is adding telemetry to detect if people are changing the mode as this will inform us if we need to revisit the default. At this time, we plan to continue evolving Windows mode rather than switching to Standard mode on Windows. This was not an easy discussion and we'll continue to monitor feedback. |
This issue has been marked as declined and has not had any activity for 1 day. It has been closed for housekeeping purposes. |
@SteveL-MSFT: Is there definitive documentation or guidance from the PowerShell team for how script authors should react to these changes? So far the best documentation I have found are these resources: https://stackoverflow.com/a/74440425 @mklement0: Thank you for creating these docs!
|
Summary of the new feature / enhancement
Given the impact to users with the 7.3.0 release, proposal is to change the default of
$PSNativeCommandArgumentPassing
toLegacy
on Windows (stillStandard
on non-Windows). We would keep the default asWindows
on Windows for preview releases. This would be backported to 7.3.xThis was discussed and approved by @commi
Proposed technical implementation details (optional)
No response
The text was updated successfully, but these errors were encountered: