Skip to content
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

Piping native | native or $bytes | native or native > file will no longer corrupt binary data #10134

Closed
2 tasks done
SeeminglyScience opened this issue Jun 5, 2023 · 0 comments · Fixed by #10157
Closed
2 tasks done
Assignees
Labels
area-experimental Area - experimental feature support issue-doc-idea Issue - request for new content
Milestone

Comments

@SeeminglyScience
Copy link
Contributor

SeeminglyScience commented Jun 5, 2023

Prerequisites

  • Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
  • Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Document new Get-Foo cmdlet" instead of "New cmdlet."

Summary

Previously, the output of every native command (aka console application) would first be encoded into strings before being sent to downstream command or file. This was also true for all input passed to a native command.

With the change in PowerShell/PowerShell#17857 there are some specific scenarios where this is no longer the case.

Details

These examples previously did not work, but will work as expected with the changes.

$uri = 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.4/powershell-7.3.4-linux-x64-fxdependent.tar.gz'

# native to native
curl.exe -s -L $uri | tar -xzvf - -C .

# native to file
curl.exe -s -L $uri > powershell.tar.gz

# bytes to native
(Invoke-WebRequest $uri).Content | tar -xzvf - -C .

# bytes to native (all at once as byte[])
,(Invoke-WebRequest $uri).Content | tar -xzvf - -C .

Articles

Related Source Pull Requests

Related Source Issues

@SeeminglyScience SeeminglyScience added issue-doc-idea Issue - request for new content needs-triage Waiting - Needs triage labels Jun 5, 2023
@sdwheeler sdwheeler added area-experimental Area - experimental feature support and removed needs-triage Waiting - Needs triage labels Jun 5, 2023
@sdwheeler sdwheeler added this to the 7.4 milestone Jun 5, 2023
@sdwheeler sdwheeler self-assigned this Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-experimental Area - experimental feature support issue-doc-idea Issue - request for new content
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants