Skip to content

docs: remove duplicate summary, expand FAQ to 5 items#19

Closed
yang12535 wants to merge 1 commit into
mainfrom
fix/sha256-case-and-docs
Closed

docs: remove duplicate summary, expand FAQ to 5 items#19
yang12535 wants to merge 1 commit into
mainfrom
fix/sha256-case-and-docs

Conversation

@yang12535

Copy link
Copy Markdown
Owner

fix: SHA256 case bug + FAQ expansion

PowerShell Get-FileHash returns uppercase SHA256, but PS7 hash was lowercase. Direct -ne comparison always fails.

Changes:

  • Add .ToUpper() to both PS7 and WT hash comparisons
  • Remove duplicate summary block after changelog
  • Add Q4: first launch still shows PS5.1 (needs restart)
  • Add Q5: where to find new SHA256 hashes

Copilot AI review requested due to automatic review settings May 19, 2026 02:58
@yang12535 yang12535 force-pushed the fix/sha256-case-and-docs branch from 443040e to 0d9beb5 Compare May 19, 2026 03:00

Copilot AI left a comment

Copy link
Copy Markdown

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 updates the Windows Terminal + PowerShell 7 setup post to address a reported SHA256 verification mismatch in the embedded PowerShell script, expands the FAQ with additional troubleshooting notes, and removes a duplicated summary block near the end of the post.

Changes:

  • Adjust SHA256 comparison lines in the script to normalize the expected hash value with .ToUpper().
  • Add FAQ entries explaining why PS 5.1 may still appear on first launch and where to find updated SHA256 values for upgrades.
  • Remove a duplicated summary block after the changelog.
Comments suppressed due to low confidence (1)

content/posts/win-terminal-setup.md:72

  • 这里对 $wtZipHash 调用 .ToUpper() 目前是冗余的(变量本身已是大写),且与前述一样:-ne 默认不区分大小写,所以这行改动基本不影响行为。为了避免重复/不一致,建议用显式 -ine(或统一对两侧做同样的规范化),并同步更新文内代理版脚本里同样的 SHA256 比较逻辑。
$wtZipHash = "8FB268B93C9B99D6CF553709C2C58BF1B2FF4B364199152E09221DFB2A44BBF5"
if ((Get-FileHash $wtZip -Algorithm SHA256).Hash -ne $wtZipHash.ToUpper()) {
    throw "Windows Terminal zip SHA256 校验失败"

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

Comment thread content/posts/win-terminal-setup.md Outdated
Invoke-WebRequest -Uri $ps7Url -OutFile $ps7Out -UseBasicParsing -ErrorAction Stop -TimeoutSec 300
$ps7Hash = "ed331a04679b83d4c013705282d1f3f8d8300485eb04c081f36e11eaf1148bd0"
if ((Get-FileHash $ps7Out -Algorithm SHA256).Hash -ne $ps7Hash) {
if ((Get-FileHash $ps7Out -Algorithm SHA256).Hash -ne $ps7Hash.ToUpper()) {
Note: SHA256 case comparison was reverted after review — PowerShell
-ne is case-insensitive by default, so the original script did not
have a case-sensitivity bug.

Changes:
- Remove duplicate summary block after changelog
- Add Q4: first launch still shows PS5.1 (needs restart)
- Add Q5: where to find new SHA256 hashes on GitHub Release pages
- Update changelog: FAQ count from 3 to 5
@yang12535 yang12535 force-pushed the fix/sha256-case-and-docs branch from 0d9beb5 to 552251c Compare May 19, 2026 03:04
@yang12535 yang12535 changed the title fix: SHA256 case bug + FAQ expansion docs: remove duplicate summary, expand FAQ to 5 items May 19, 2026
@yang12535

Copy link
Copy Markdown
Owner Author

Closing: the SHA256 case-sensitivity concern was a false positive (PowerShell -ne is case-insensitive by default). Other doc tweaks (FAQ expansion, duplicate summary removal) are minor and can be handled separately if needed.

@yang12535 yang12535 closed this May 19, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 552251cfac

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -296,7 +308,7 @@ if (Test-Path $ps7Out) { Remove-Item $ps7Out -Force }
Write-Host ">>> 下载 PowerShell $ps7Ver..." -ForegroundColor Cyan

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Apply the SHA case fix to the primary script too

This fixes the proxy copy, but the main “一键脚本” earlier in the article still defines the same lowercase $ps7Hash and compares it directly with Get-FileHash at lines 46-47. Anyone following the default script instead of the proxy appendix will still hit the uppercase-vs-lowercase mismatch and throw before installing PowerShell, so the documented primary path remains broken.

Useful? React with 👍 / 👎.

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.

2 participants