Skip to content

Commit

Permalink
aa
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrohanea committed Nov 10, 2024
1 parent 5864aaa commit d1ed8a6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/collect-gpt-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ jobs:
Write-Output "Checking path: $fullPath" # Debugging
if (Test-Path $fullPath) {
$content = Get-Content -Path $fullPath -Raw
Add-Content -Path "code_snippets.md" -Value "```csharp`n$content`n```"
$content = Get-Content -Path $fullPath -Raw | Out-String
Add-Content -Path "code_snippets.md" -Value "```csharp"
Add-Content -Path "code_snippets.md" -Value $content
Add-Content -Path "code_snippets.md" -Value "```n"
} else {
Add-Content -Path "code_snippets.md" -Value "```csharp`n// File not found.`n```"
Write-Error "File not found: $fullPath" exit 1 # Fail the script if a file is not found
}
}
Expand Down

0 comments on commit d1ed8a6

Please sign in to comment.