Skip to content

Conversation

@alexvy86
Copy link
Contributor

@alexvy86 alexvy86 commented Jan 7, 2026

PR Summary

The current installation instructions to install on Raspberry Pi OS fail on zsh because the body property in the response from https://api.github.com/repos/PowerShell/PowerShell/releases/latest has newline characters (\n), and it seems that defaults in zsh (or maybe a setting I forgot I changed, but general point stands) are different from bash, and cause the jq invocation to fail:

image

Adding -E to echo to explicitly disable interpretation of \n makes the command work in both shells.

PR Checklist

  • Descriptive Title: This PR's title is a synopsis of the changes it proposes.
  • Summary: This PR's summary describes the scope and intent of the change.
  • Contributor's Guide: I have read the [contributor's guide][contrib].
  • Style: This PR adheres to the [style guide][style].

Copilot AI review requested due to automatic review settings January 7, 2026 16:25
@learn-build-service-prod
Copy link
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the Raspberry Pi OS installation instructions by adding the -E flag to the echo command to ensure compatibility with both bash and zsh shells. The issue occurs because zsh interprets backslash escape sequences (like \n) in the JSON response from the GitHub API by default, which causes the jq command to fail.

Key Changes:

  • Modified the echo command to use echo -E to explicitly disable interpretation of backslash escape sequences in the shell variable

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

bits=$(getconf LONG_BIT)
release=$(curl -sL https://api.github.com/repos/PowerShell/PowerShell/releases/latest)
package=$(echo $release | jq -r ".assets[].browser_download_url" | grep "linux-arm${bits}.tar.gz")
package=$(echo -E $release | jq -r ".assets[].browser_download_url" | grep "linux-arm${bits}.tar.gz")
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable $release should be quoted to prevent word splitting and globbing issues. Additionally, while -E works for compatibility between bash and zsh, using printf '%s\n' instead of echo -E would be more portable across different shells and follows shell scripting best practices. Consider changing to: package=$(printf '%s\n' "$release" | jq -r ".assets[].browser_download_url" | grep "linux-arm${bits}.tar.gz")

Suggested change
package=$(echo -E $release | jq -r ".assets[].browser_download_url" | grep "linux-arm${bits}.tar.gz")
package=$(printf '%s\n' "$release" | jq -r ".assets[].browser_download_url" | grep "linux-arm${bits}.tar.gz")

Copilot uses AI. Check for mistakes.
@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 99d828a:

✅ Validation status: passed

File Status Preview URL Details
reference/docs-conceptual/install/community-support.md ✅Succeeded View (>=powershell-5.1)

For more details, please refer to the build report.

@mikefrobbins mikefrobbins self-requested a review January 8, 2026 00:07
@learn-build-service-prod
Copy link
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit e891d0d:

✅ Validation status: passed

File Status Preview URL Details
reference/docs-conceptual/install/community-support.md ✅Succeeded View (>=powershell-5.1)

For more details, please refer to the build report.

Copy link
Contributor

@mikefrobbins mikefrobbins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mikefrobbins mikefrobbins merged commit 5d54677 into MicrosoftDocs:main Jan 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants