From a79385cd27152781061d6ae8573a8aa4dc911de6 Mon Sep 17 00:00:00 2001 From: amirimranamiruddin <187467595+amirimranamiruddin@users.noreply.github.com> Date: Tue, 1 Sep 2026 10:42:25 +0800 Subject: [PATCH] Fix plannotator-tui fetch for native Windows (Git Bash/MSYS/Cygwin) The README documents Windows as a supported platform for the plugin build/link workflow, and plannotator-tui releases already ship an x86_64-pc-windows-msvc.exe asset, but fetch-plannotator-tui.sh's uname-based case statement only matched Darwin and Linux. On native Windows, the build step runs under Git Bash/MSYS, where uname -s reports MINGW64_NT-..., so the script fell into the default branch, printed a warning, and skipped the download entirely -- silently leaving the document-review pane unavailable. Add a case for MINGW64/MSYS_NT/CYGWIN x86_64 that selects the windows-msvc target and appends the .exe extension when fetching and verifying the release asset (the same sha256 verification path is reused unchanged). Verified locally: after this fix, running scripts/fetch-plannotator-tui.sh from a clean bin/ downloads and sha256-verifies the pinned release, and both bin/plannotator-tui and scripts/plannotator-tui.sh --version report the correct version. --- scripts/fetch-plannotator-tui.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/fetch-plannotator-tui.sh b/scripts/fetch-plannotator-tui.sh index 22cc08e..74ca741 100755 --- a/scripts/fetch-plannotator-tui.sh +++ b/scripts/fetch-plannotator-tui.sh @@ -36,15 +36,17 @@ if [ -n "${PLANNOTATOR_TUI_BIN:-}" ]; then exit 0 fi +windows_ext="" case "$(uname -s)/$(uname -m)" in Darwin/arm64) target=aarch64-apple-darwin ;; Darwin/x86_64) target=x86_64-apple-darwin ;; Linux/x86_64) target=x86_64-unknown-linux-gnu ;; Linux/aarch64|Linux/arm64) target=aarch64-unknown-linux-gnu ;; + MINGW64*/x86_64|MSYS_NT*/x86_64|CYGWIN*/x86_64) target=x86_64-pc-windows-msvc; windows_ext=".exe" ;; *) echo "warning: no plannotator-tui build for $(uname -s)/$(uname -m); the review pane is unavailable" >&2; exit 0 ;; esac -asset="plannotator-tui-$target" +asset="plannotator-tui-$target$windows_ext" base="https://github.com/plannotator/plannotator-tui/releases/download/v$version" tmp="$(mktemp -d)" trap 'rm -rf "$tmp"' EXIT