From 220d0c24c74f69a0684dce511d8cc721146368fb Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Wed, 24 Nov 2021 18:01:01 +0530 Subject: [PATCH] Fix reading build commit on Windows --- src/scripts/win32.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scripts/win32.ps1 b/src/scripts/win32.ps1 index cd648b73..f75b9619 100644 --- a/src/scripts/win32.ps1 +++ b/src/scripts/win32.ps1 @@ -521,7 +521,9 @@ if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version if ($version -match $nightly_versions) { Invoke-WebRequest -UseBasicParsing -Uri $php_builder/releases/latest/download/Get-PhpNightly.ps1 -OutFile $php_dir\Get-PhpNightly.ps1 > $null 2>&1 & $php_dir\Get-PhpNightly.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir -Version $version > $null 2>&1 - $extra_version = " ($(Get-Content $php_dir\COMMIT))" + if(Test-Path $php_dir\COMMIT) { + $extra_version = " ($( Get-Content $php_dir\COMMIT ))" + } } else { Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force > $null 2>&1 }