Files
github-spec-kit/.github/workflows/scripts
ericnoam 1de78514e2 fix: use .NET Regex.Replace for count-limited replacement in PowerShell
Addresses Copilot feedback: PowerShell's -replace operator does not
support a third argument for replacement count. Using it causes an
error or mis-parsing that would break forge package generation on
Windows.

Changed from:
  $content -replace '(?m)^---$', "---`nname: $cmdName", 1

To:
  $regex = [regex]'(?m)^---$'
  $content = $regex.Replace($content, "---`nname: $cmdName", 1)

The .NET Regex.Replace() method properly supports the count parameter,
ensuring the name field is injected only after the first frontmatter
delimiter (not the closing one).

This fix is critical for Windows users running:
  specify init --ai forge --offline
2026-03-31 22:02:31 +02:00
..
2025-10-14 11:52:26 -07:00
2025-10-14 11:52:26 -07:00
2025-10-14 11:52:26 -07:00