From c0531aa048f300d74891c84abde7b208a98f6b4f Mon Sep 17 00:00:00 2001 From: "claude@clouddev1" Date: Fri, 19 Jun 2026 14:57:25 +0000 Subject: [PATCH] fix(install): use install.ps1 immediately + honest PATH guidance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The persisted User PATH only reaches newly-started processes, so the old "restart your shell" advice was wrong — a sign-out/in was actually needed (observed on Windows 11). Update the current session's $env:Path as well so the command works right away in the same window, and reword the notice. Also refresh the header: verified on ARM64 Windows 11 under Windows PowerShell 5.1 and PowerShell 7.6 against the live v0.2.0 release. --- scripts/install.ps1 | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 6a9228d..dcfc521 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -24,9 +24,11 @@ %LOCALAPPDATA%\Programs\rdbms-playground. .NOTES - Written but NOT tested on Windows from this environment (no PowerShell - here) — validate on a real Windows host. The verified sibling is - install.sh (Linux/macOS). + Verified end-to-end on ARM64 Windows 11 under both Windows PowerShell 5.1 + and PowerShell 7.6, against the live v0.2.0 release. The x86_64 branch is + symmetric (env-based arch detection + a confirmed matching release asset) + but has not been run directly. The sibling installer is install.sh + (Linux/macOS). #> [CmdletBinding()] param( @@ -98,14 +100,22 @@ try { Move-Item -Path $exe -Destination $dest -Force Write-Host "installed $Bin $Version -> $dest" - # Add the install dir to the user PATH (persistent) if it's not there. + # Persist the install dir on the user PATH (for future shells) if missing. $userPath = [Environment]::GetEnvironmentVariable('Path', 'User') if (-not $userPath) { $userPath = '' } if (($userPath -split ';') -notcontains $InstallDir) { $newPath = if ($userPath) { "$userPath;$InstallDir" } else { $InstallDir } [Environment]::SetEnvironmentVariable('Path', $newPath, 'User') - Write-Host "added $InstallDir to your user PATH — restart your shell to pick it up" } + # Also update THIS session's PATH so the command works immediately. The + # persisted change only reaches newly-started processes; an already-running + # shell (and, depending on how the terminal inherited its environment, even + # a freshly-opened one) won't see it until the next sign-out/in. + if (($env:Path -split ';') -notcontains $InstallDir) { + $env:Path = "$env:Path;$InstallDir" + } + Write-Host "added $InstallDir to your PATH — '$Bin' works in this window now." + Write-Host "for shells already open elsewhere, sign out and back in (or open a fresh one)." } finally { Remove-Item -Path $tmp -Recurse -Force -ErrorAction SilentlyContinue