Skip to content

Commit bb4404f

Browse files
jnMetaCodeclaude
andcommitted
fix: 修复 convert.ps1 在低版本 PowerShell 上 FullName 属性丢失的问题
移除 Sort-Object 管道,避免部分 Windows PowerShell 版本丢失对象属性。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9b385f2 commit bb4404f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/convert.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ function Run-Conversions {
335335
foreach ($dir in $AgentDirs) {
336336
$dirPath = Join-Path $RepoRoot $dir
337337
if (-not (Test-Path $dirPath)) { continue }
338-
Get-ChildItem -Path $dirPath -Filter "*.md" -Recurse | Sort-Object FullName | ForEach-Object {
339-
$lines = Get-Content $_.FullName -Encoding UTF8
338+
Get-ChildItem -Path $dirPath -Filter "*.md" -Recurse | ForEach-Object {
339+
$lines = Get-Content -Path $_.FullName -Encoding UTF8
340340
if ($lines.Count -eq 0 -or $lines[0] -ne "---") { return }
341341
$name = Get-Field "name" $lines
342342
if (-not $name) { return }

0 commit comments

Comments
 (0)