feat: add Windows install script#32
Conversation
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR adds a new Windows PowerShell installer script (scripts/install.ps1) and updates README.md with OS-specific installation instructions. The script validates the platform is Windows, detects architecture (x64 supported), fetches the latest GitHub release, downloads and installs the matching binary to a user-scoped directory, updates the user PATH, verifies installation, and cleans up temporary files. Sequence Diagram(s)sequenceDiagram
participant User
participant InstallScript as install.ps1
participant GitHubAPI
participant FileSystem
User->>InstallScript: run install.ps1
InstallScript->>InstallScript: Assert-Windows / Get-DotArchitecture
InstallScript->>GitHubAPI: Get-LatestRelease
GitHubAPI-->>InstallScript: release metadata
InstallScript->>GitHubAPI: download matching asset
GitHubAPI-->>InstallScript: binary file
InstallScript->>FileSystem: Install-DotBinary (move to dot.exe)
InstallScript->>FileSystem: Add-ToUserPath
InstallScript->>FileSystem: Test-Installation (run dot --help)
InstallScript->>FileSystem: Remove-TempDir
InstallScript-->>User: success/warning output
Compact metadata
Related issues: None specified Related PRs: None specified Suggested labels: documentation, enhancement, windows Suggested reviewers: pablopunk Poem 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Fix pushed: replaced RuntimeInformation-based architecture detection with Windows environment variables for Windows PowerShell compatibility.\n\nValidation: |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
scripts/install.ps1 (1)
66-70: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low valueConsider allowing ARM64 via x64 emulation.
Windows 11 on ARM64 transparently runs x64 binaries under emulation, so hard-blocking
arm64denies an otherwise-working install. You could fall back to thex64asset with a note instead of exiting.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/install.ps1` around lines 66 - 70, The architecture check in the install script currently hard-blocks arm64, but Windows 11 on ARM64 can run the x64 asset under emulation. Update the arm64 branch in the install logic to fall back to the x64 download path instead of exiting, and keep a warning message in the relevant installer flow so users know emulation is being used.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/install.ps1`:
- Around line 208-213: The native binary check in the install script only
catches launch failures, so a non-zero exit from the $DotPath --help invocation
can still be reported as success. Update the try block around the $DotPath call
to inspect $LASTEXITCODE after the native command runs, and branch to
Write-Success only when it is zero; otherwise emit the warning path in the same
install script flow.
- Around line 54-76: The helper failures in Assert-Windows and
Get-DotArchitecture currently use exit, which can terminate the caller’s
PowerShell session when invoked from the installer flow. Change these helpers to
throw terminating errors instead of exiting, then catch and report those
failures in Main so the script returns control to the prompt cleanly. Keep the
existing validation logic in Assert-Windows and Get-DotArchitecture, but move
process-level termination responsibility out of the helpers.
- Around line 162-191: The PATH update logic in the PowerShell installer is
flattening expandable user PATH entries because it reads with
GetEnvironmentVariable and writes back with SetEnvironmentVariable, which can
lose REG_EXPAND_SZ segments. Update the PATH handling in the install script to
read and write HKCU\Environment\Path directly using DoNotExpandEnvironmentNames
when reading and ExpandString when saving, and keep the existing
normalization/check logic in place around the PATH merge in the installer flow.
---
Nitpick comments:
In `@scripts/install.ps1`:
- Around line 66-70: The architecture check in the install script currently
hard-blocks arm64, but Windows 11 on ARM64 can run the x64 asset under
emulation. Update the arm64 branch in the install logic to fall back to the x64
download path instead of exiting, and keep a warning message in the relevant
installer flow so users know emulation is being used.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c9f94ceb-ae1a-4d09-934d-7bab4d3bf28e
📒 Files selected for processing (2)
README.mdscripts/install.ps1
|
Addressed the CodeRabbit review comments:
Validation:
|
Summary
dot-windows-x64.exerelease assetdot.exeunder%LOCALAPPDATA%\Programs\dotTesting
npm exec --yes bun@latest -- testdot-windows-x64.exegit diff --cached --checkPrepared with help from Hermes/Codex AI.
Summary by CodeRabbit
New Features
Documentation