diff --git a/GenerateGitCommit.ps1 b/GenerateGitCommit.ps1 index 8201552..93de2bf 100644 --- a/GenerateGitCommit.ps1 +++ b/GenerateGitCommit.ps1 @@ -8,9 +8,10 @@ try { if ($LASTEXITCODE -eq 0) { $shortHash = $commitHash.Substring(0, 7).Trim() - $shortHash | Out-File -FilePath $commitFile -Encoding UTF8 -NoNewline + $trimmedHash = $commitHash.Trim() + [System.IO.File]::WriteAllText($commitFile, $shortHash, [System.Text.Encoding]::ASCII) Write-Host "Git Commit Hash: $shortHash" -ForegroundColor Green - Write-Host "Full Hash: $commitHash.Trim()" -ForegroundColor Cyan + Write-Host "Full Hash: $trimmedHash" -ForegroundColor Cyan } else { Write-Host "Warning: Not a git repository or git not found" -ForegroundColor Yellow diff --git a/GitCommit.txt b/GitCommit.txt index 90ea7dc..48a9dcc 100644 --- a/GitCommit.txt +++ b/GitCommit.txt @@ -1 +1 @@ -9ac476e \ No newline at end of file +a01dd4e \ No newline at end of file