-
Notifications
You must be signed in to change notification settings - Fork 7k
Description
Bug Description
--offline scaffolding fails on Windows because the PowerShell release script drops the -Agents and -Scripts arguments internally, so no bundled package is produced.
This shows up as:
Error: --offline was specified but scaffolding from bundled assets failed.
Detail: release script produced no output
The root cause is in .github/workflows/scripts/create-release-packages.ps1: the helper function Normalize-List uses param([string]$Input), which conflicts with PowerShell’s automatic $input variable. Because PowerShell variable names are case-insensitive, the passed value is effectively lost and the filtered build lists become empty.
Steps to Reproduce
On Windows with pwsh installed, run:
specify init my-project --ai opencode --script ps --offline
Observe the offline init failure:
Error: --offline was specified but scaffolding from bundled assets failed.
Detail: release script produced no output
To reproduce the lower-level script bug directly, run:
pwsh -File .github/workflows/scripts/create-release-packages.ps1 -Version v0.0.0 -Agents opencode -Scripts ps
Observe that the script prints:
Building release packages for v0.0.0
Agents:
Scripts:
Archives in .genreleases:
No spec-kit-template-opencode-ps-v0.0.0.zip is created.
Expected Behavior
--offline should scaffold successfully on Windows when pwsh is installed and the selected agent/script pair is supported.
The PowerShell release script should honor:
-Agents opencode -Scripts ps
and generate the expected offline package output.
Actual Behavior
Offline scaffolding fails with:
Error: --offline was specified but scaffolding from bundled assets failed.
Detail: release script produced no output
The underlying PowerShell script exits successfully but ignores the filtered values, prints empty Agents: and Scripts: lines, and produces no output package.
Specify CLI Version
0.4.0
AI Agent
opencode
Operating System
Windows 11
Python Version
3.12.11
Error Logs
Error: --offline was specified but scaffolding from bundled assets failed.
Common causes: missing bash/pwsh, script permission errors, or incomplete wheel.
Remove --offline to attempt a GitHub download instead.
Detail: release script produced no outputAdditional Context
Root cause appears to be a PowerShell script bug in .github/workflows/scripts/create-release-packages.ps1.
Problematic code:
function Normalize-List {
param([string]$Input)
if ([string]::IsNullOrEmpty($Input)) {
return @()
}
$items = $Input -split '[,\s]+' | Where-Object { $_ } | Select-Object -Unique
return $items
}
Because $Input conflicts with PowerShell’s automatic $input variable, the function can return an empty result even when called with values like opencode or ps.
Suggested fix:
Rename the function parameter from $Input to $Value or similar
Update call sites from Normalize-List -Input ... to Normalize-List -Value ...
Suggested regression test:
Run create-release-packages.ps1 with -Agents opencode -Scripts ps
Assert stdout contains:
Agents: opencode
Scripts: ps
Assert spec-kit-template-opencode-ps-v0.0.0.zip is created