Add additional platform check for Windows before launching native app.#19812
Add additional platform check for Windows before launching native app.#19812daxian-dbw merged 4 commits intoPowerShell:masterfrom
Conversation
This change ensures that we do not get the cursor position in preparation for the BufferCell call since it is only supported on Windows. On non-Windows machines this might also cause problems for applications such as �xpect in which pwsh runs in a session connected by a pty. This change should address the misbehavior described in issue PowerShell#18874.
| if (_runStandAlone) | ||
| { | ||
| if (s_supportScreenScrape == null) | ||
| if (s_supportScreenScrape == null && Platform.IsWindows) |
There was a problem hiding this comment.
Usually we use #if !UNIX.
There was a problem hiding this comment.
The suggestion was made by @SeeminglyScience in conversation to do it this way - I'll let the two of you sort out this conflicting feedback
There was a problem hiding this comment.
The suggestion was made by @SeeminglyScience in conversation to do it this way - I'll let the two of you sort out this conflicting feedback
That was based on the assumption that RuntimeInformation.IsOSPlatform was a JIT intrinsic, which doesn't seem to be true anyway (even if it were used here). The ifdef is better 👍
|
@JamesWTruher Please take a look at the CI failures. |
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
🎉 Handy links: |
PR Summary
Fix #18874
This change ensures that we do not get the cursor position in preparation for the BufferCell call since it is only supported on Windows. On non-Windows machines this might also cause problems for applications such as
expectin which pwsh runs in a session connected by a pty. This change should address the misbehavior described in issue #18874.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP: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.(which runs in a different PS Host).