From 744e40a920d47b23a74f1471185841a46c657330 Mon Sep 17 00:00:00 2001 From: Klaus Dandl <76051010+Utesgui@users.noreply.github.com> Date: Sat, 11 May 2024 18:27:58 +0000 Subject: [PATCH] Refactor Get-ProductVersionFromFile function to handle null version info --- Scripts/common.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/common.ps1 b/Scripts/common.ps1 index 0cdce10..4568318 100644 --- a/Scripts/common.ps1 +++ b/Scripts/common.ps1 @@ -163,7 +163,7 @@ function Get-ProductVersionFromFile { } $versionInfo = $file.VersionInfo.$VersionInfoProperty - $versionInfo = $versionInfo.Trim() + $versionInfo = $versionInfo.ToString().Trim() if ($null -eq $versionInfo) { Write-Host "Could not find version info in file"