diff --git a/CHANGELOG.md b/CHANGELOG.md index d7eead6..b703a24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ All notable changes to Looper are documented here. Versions follow [Semantic Versioning](https://semver.org/); the loop spec format is versioned separately via `version:` in `loop.yaml` (currently `1`). +## 0.2.1 — 2026-07-05 + +### Fixed +- `install.ps1` crashed on Windows PowerShell 5.1 with "Argument expected for + the -c option": the Python probe passed an empty string (which PowerShell + drops for native executables) and its stderr redirect became a terminating + error under the script's `Stop` preference. The probe now runs `--version` + with stderr tolerated and validates the exit code (#14). + ## 0.2.0 — 2026-07-05 Remediation release from a full audit of the runner, compiler, installers, diff --git a/install.ps1 b/install.ps1 index 62ec1b8..b1f9d54 100644 --- a/install.ps1 +++ b/install.ps1 @@ -16,15 +16,25 @@ if (-not (Get-Command git -ErrorAction SilentlyContinue)) { # Validate by executing, not just locating: on Windows, "python" on PATH is # often the Microsoft Store alias stub, which exists but cannot run scripts. +# The probe must tolerate stub stderr output without tripping the script's +# ErrorActionPreference = "Stop". $Python = $null foreach ($Candidate in @("python", "py")) { $Command = Get-Command $Candidate -ErrorAction SilentlyContinue - if ($Command) { - & $Command.Source -c "" 2>$null - if ($LASTEXITCODE -eq 0) { - $Python = $Command - break - } + if (-not $Command) { continue } + $PreviousEAP = $ErrorActionPreference + $ErrorActionPreference = "Continue" + try { + $null = & $Command.Source --version 2>&1 + $Works = ($LASTEXITCODE -eq 0) + } catch { + $Works = $false + } finally { + $ErrorActionPreference = $PreviousEAP + } + if ($Works) { + $Python = $Command + break } } if (-not $Python) { diff --git a/pyproject.toml b/pyproject.toml index 186265f..492c750 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "looper-skill" -version = "0.2.0" +version = "0.2.1" description = "A Claude Code skill that scaffolds well-designed agent loops." readme = "README.md" requires-python = ">=3.9"