René's URL Explorer Experiment


Title: 7.4.0 File redirection with native executable no longer appends new line · Issue #20811 · PowerShell/PowerShell · GitHub

Open Graph Title: 7.4.0 File redirection with native executable no longer appends new line · Issue #20811 · PowerShell/PowerShell

X Title: 7.4.0 File redirection with native executable no longer appends new line · Issue #20811 · PowerShell/PowerShell

Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerShell 5.1 and PowerShell. Steps to reprodu...

Open Graph Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...

X Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...

Opengraph URL: https://github.com/PowerShell/PowerShell/issues/20811

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"7.4.0 File redirection with native executable no longer appends new line","articleBody":"### Prerequisites\n\n- [X] Write a descriptive title.\n- [X] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [X] Search the existing issues.\n- [X] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [X] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\nAccording to [about_Redirection](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_redirection?view=powershell-7.4):\r\n\u003e Using the redirection operator with a file target is functionally equivalent to piping to Out-File with no extra parameters.\r\n\r\nThe documentation for [Out-File](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/out-file?view=powershell-7.4) `-NoNewLine` says:\r\n\u003e No newline is added after the last output string.\r\n\r\nWhich means `Out-File` does normally add a newline. And this is what you see in PowerShell 7.3.10. If the output does not end in a newline, `Out-File` and file redirection add a newline. **But in PowerShell 7.4.0, with file redirection that newline is no longer added.** \r\n\r\nTo make this easy to repro you'll want a native executable that outputs character data but no newline (LF or CR/LF) _at the end_. Here's a C# program that does that. You *don't have to* use this program to repro the problem. It just helps.\r\n```\r\nnamespace Example;\r\n\r\ninternal class Program\r\n{\r\n    static void Main()\r\n    {\r\n        Console.Write(\"Hello\"); // Note that it's not WriteLine()\r\n    }\r\n}\r\n```\r\n\r\nThis appears to be related to the PR: https://github.com/PowerShell/PowerShell/pull/17857 by @SeeminglyScience that was added in preview 4\r\n\r\nAppears to be related to #20747 and #20808.\n\n### Expected behavior\n\n```console\n# See \"Steps to reproduce\" for source code for Hello.exe\r\n\r\nPS\u003e .\\Hello.exe \u003ex.txt\r\n\r\nPS\u003e (Get-Content x.txt -Raw).EndsWith([System.Environment]::NewLine)\r\nTrue\n```\n\n\n### Actual behavior\n\n```console\n# See \"Steps to reproduce\" for source code for Hello.exe\r\n\r\nPS\u003e .\\Hello.exe \u003ex.txt\r\n\r\nPS\u003e (Get-Content x.txt -Raw).EndsWith([System.Environment]::NewLine)\r\nFalse\n```\n\n\n### Error details\n\n```console\nN/A\n```\n\n\n### Environment data\n\n```powershell\nName                           Value\r\n----                           -----\r\nPSVersion                      7.4.0\r\nPSEdition                      Core\r\nGitCommitId                    7.4.0\r\nOS                             Microsoft Windows 10.0.19044\r\nPlatform                       Win32NT\r\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion      2.3\r\nSerializationVersion           1.1.0.1\r\nWSManStackVersion              3.0\n```\n\n\n### Visuals\n\n### 7.3.10\r\n![image](https://github.com/PowerShell/PowerShell/assets/66026737/459ff3b6-8bdd-4a09-b938-881339997748)\r\n\r\n### 7.4.0\r\n![image](https://github.com/PowerShell/PowerShell/assets/66026737/adb8fc2a-e7a0-4e18-95cc-490823b78d7a)\r\n","author":{"url":"https://github.com/twinter-amosfivesix","@type":"Person","name":"twinter-amosfivesix"},"datePublished":"2023-11-29T17:55:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/20811/PowerShell/issues/20811"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f7b3b13f-8ba7-bd06-8ae9-1adbe4a01c49
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9CD6:F01E1:3841236:4D91823:6A54B386
html-safe-nonced7c878814a4925dc03c3b705553d304ec792adac444addcd7e5550de27bdaeb9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Q0Q2OkYwMUUxOjM4NDEyMzY6NEQ5MTgyMzo2QTU0QjM4NiIsInZpc2l0b3JfaWQiOiI1ODM5MjAxNTI0Njc3NjUzMzgyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac78bcb85c960f6643ccdf4c3ea2858bd21455b78c98adf4946ed397d9f3dc4b05
hovercard-subject-tagissue:2017130371
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/20811/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1b48d21b71f4802599b365e8e96c3ab65433d807f96dcabd49c0ae0d78d2827a/PowerShell/PowerShell/issues/20811
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1b48d21b71f4802599b365e8e96c3ab65433d807f96dcabd49c0ae0d78d2827a/PowerShell/PowerShell/issues/20811
og:image:altPrerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametwinter-amosfivesix
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
go-importgithub.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id49609581
octolytics-dimension-repository_nwoPowerShell/PowerShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49609581
octolytics-dimension-repository_network_root_nwoPowerShell/PowerShell
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release5d343e1152573ef294b28f54e4a14fb5fdb3a5a1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/PowerShell/PowerShell/issues/20811#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F20811
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F20811
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=PowerShell%2FPowerShell
Reloadhttps://github.com/PowerShell/PowerShell/issues/20811
Reloadhttps://github.com/PowerShell/PowerShell/issues/20811
Reloadhttps://github.com/PowerShell/PowerShell/issues/20811
Please reload this pagehttps://github.com/PowerShell/PowerShell/issues/20811
PowerShell https://github.com/PowerShell
PowerShellhttps://github.com/PowerShell/PowerShell
Notifications https://github.com/login?return_to=%2FPowerShell%2FPowerShell
Fork 8.4k https://github.com/login?return_to=%2FPowerShell%2FPowerShell
Star 54.4k https://github.com/login?return_to=%2FPowerShell%2FPowerShell
Code https://github.com/PowerShell/PowerShell
Issues 1.3k https://github.com/PowerShell/PowerShell/issues
Pull requests 288 https://github.com/PowerShell/PowerShell/pulls
Discussions https://github.com/PowerShell/PowerShell/discussions
Actions https://github.com/PowerShell/PowerShell/actions
Projects https://github.com/PowerShell/PowerShell/projects
Security and quality 3 https://github.com/PowerShell/PowerShell/security
Insights https://github.com/PowerShell/PowerShell/pulse
Code https://github.com/PowerShell/PowerShell
Issues https://github.com/PowerShell/PowerShell/issues
Pull requests https://github.com/PowerShell/PowerShell/pulls
Discussions https://github.com/PowerShell/PowerShell/discussions
Actions https://github.com/PowerShell/PowerShell/actions
Projects https://github.com/PowerShell/PowerShell/projects
Security and quality https://github.com/PowerShell/PowerShell/security
Insights https://github.com/PowerShell/PowerShell/pulse
7.4.0 File redirection with native executable no longer appends new linehttps://github.com/PowerShell/PowerShell/issues/20811#top
https://github.com/twinter-amosfivesix
twinter-amosfivesixhttps://github.com/twinter-amosfivesix
on Nov 29, 2023https://github.com/PowerShell/PowerShell/issues/20811#issue-2017130371
latest released versionhttps://github.com/PowerShell/PowerShell/releases
FAQhttps://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md
Differences between Windows PowerShell 5.1 and PowerShellhttps://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell
about_Redirectionhttps://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_redirection?view=powershell-7.4
Out-Filehttps://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/out-file?view=powershell-7.4
#17857https://github.com/PowerShell/PowerShell/pull/17857
@SeeminglySciencehttps://github.com/SeeminglyScience
#20747https://github.com/PowerShell/PowerShell/issues/20747
#20808https://github.com/PowerShell/PowerShell/issues/20808
https://private-user-images.githubusercontent.com/66026737/286694812-459ff3b6-8bdd-4a09-b938-881339997748.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODM5MzYxNzgsIm5iZiI6MTc4MzkzNTg3OCwicGF0aCI6Ii82NjAyNjczNy8yODY2OTQ4MTItNDU5ZmYzYjYtOGJkZC00YTA5LWI5MzgtODgxMzM5OTk3NzQ4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzEzVDA5NDQzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZjNTVlYTQxYTkyYTIxMjViYjUzNzE5MGZkNzhmYmIxNjU1ZDYzNzFjYmFmY2IwNDIyYTZhZDAyMmMwY2YzZTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.87F6r2IYDDO6iylP8sSsY0Tc6OqK5swVuBfkNjcZtTA
https://private-user-images.githubusercontent.com/66026737/286694920-adb8fc2a-e7a0-4e18-95cc-490823b78d7a.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODM5MzYxNzgsIm5iZiI6MTc4MzkzNTg3OCwicGF0aCI6Ii82NjAyNjczNy8yODY2OTQ5MjAtYWRiOGZjMmEtZTdhMC00ZTE4LTk1Y2MtNDkwODIzYjc4ZDdhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzEzVDA5NDQzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk4NGQ2MGVmNWUxZDY3N2NkOGFhY2JiNGFkMDBkMzc5MTk0M2NiNzIzNjQ2NjhmMTQ4ZjEwYTRlOTFjMmUwMTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.zvSbKqGvfudpyl-Z_ISYnELYIqWoEgf6TH4_VWvNmJ0
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.