Title: Explicit use of Out-Host causes stderr output from external programs not to be recorded in transcripts · Issue #11134 · PowerShell/PowerShell · GitHub
Open Graph Title: Explicit use of Out-Host causes stderr output from external programs not to be recorded in transcripts · Issue #11134 · PowerShell/PowerShell
X Title: Explicit use of Out-Host causes stderr output from external programs not to be recorded in transcripts · Issue #11134 · PowerShell/PowerShell
Description: Update: This issue was originally about Out-Default, but since the latter is not meant to be called from user code, that is a moot point; however, Out-Host is equally affected, and Out-Host has legitimate end-user uses, namely to send co...
Open Graph Description: Update: This issue was originally about Out-Default, but since the latter is not meant to be called from user code, that is a moot point; however, Out-Host is equally affected, and Out-Host has leg...
X Description: Update: This issue was originally about Out-Default, but since the latter is not meant to be called from user code, that is a moot point; however, Out-Host is equally affected, and Out-Host has leg...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/11134
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Explicit use of Out-Host causes stderr output from external programs not to be recorded in transcripts","articleBody":"_Update_: This issue was originally about `Out-Default`, but since the latter is not meant to be called from user code, that is a moot point; however, `Out-Host` is equally affected, and `Out-Host` has legitimate end-user uses, namely to send command output to the host rather than to the success stream.\r\n\r\nUse of `Out-Host` should not affect transcription behavior, but it currently does with respect to _stderr_ output from _external programs_ (PowerShell commands aren't affected): such output is unexpectedly not recorded.\r\n\r\n# Steps to reproduce\r\n\r\nRun the following on Windows:\r\n\r\n```powershell\r\n$file = [IO.Path]::GetTempFileName()\r\nStart-Transcript $file\r\n\r\n# Execute an external command that produces both stdout and stderr output\r\n# Note: Without the Out-Host, transcribing works as expected.\r\ncmd /c 'echo stdout & nosuch' | Out-Host\r\n\r\nStop-Transcript\r\n\r\nSelect-String 'stdout' $file | Should -match 'stdout'\r\nSelect-String 'nosuch' $file | Should -match 'nosuch'\r\n\r\n'Tests completed.'\r\nRemove-Item $file\r\n```\r\n\r\n# Expected behavior\r\n\r\nBoth tests should pass.\r\n\r\n# Actual behavior\r\n\r\nThe 2nd test fails, because stderr output was not recorded.\r\n\r\n```none\r\nExpected regular expression 'nosuch' to match $null, but it did not match.\r\n```\r\n\r\n# Environment data\r\n\r\n```none\r\nPowerShell Core 7.0.0-preview.6\r\n```\r\n\r\nWindows PowerShell is affected too.","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2019-11-20T16:11:56Z","url":"https://github.com/PowerShell/PowerShell/issues/11134"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7f6f6a30-0a48-df51-63ad-65da302c6334 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8300:2CFBF7:1C0F708:2732926:6AFD0E8C |
| html-safe-nonce | ecfcd581c93a7d36e7fa866bfd0c50bd1b9f51b3e485fc8544b8b140180ba607 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzAwOjJDRkJGNzoxQzBGNzA4OjI3MzI5MjY6NkFGRDBFOEMiLCJ2aXNpdG9yX2lkIjoiMTAzMTMyMDMwMDY2ODM5MTA1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 69c51b73d8222d0064bd062e1e93fb7530147f0d8aa9e9b2791fe8b1e6726f00 |
| hovercard-subject-tag | issue:525906109 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/11134/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f09be95587f694b713530d706504feb2928ff0c8998273cec6aeba037fa276ee/PowerShell/PowerShell/issues/11134 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f09be95587f694b713530d706504feb2928ff0c8998273cec6aeba037fa276ee/PowerShell/PowerShell/issues/11134 |
| og:image:alt | Update: This issue was originally about Out-Default, but since the latter is not meant to be called from user code, that is a moot point; however, Out-Host is equally affected, and Out-Host has leg... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mklement0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b29de2abb97b6307b16270785efeb58b51a117d5a9b659acf00b77aa00e7043b |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c9e619def6d670dc18a45d3b02cea938c1c7e47 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width