Skip to content

Commit

Permalink
Refactor Get-ProductVersionFromFile function to handle null version info
Browse files Browse the repository at this point in the history
  • Loading branch information
Utesgui authored May 11, 2024
1 parent df158b3 commit 744e40a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Scripts/common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 744e40a

Please sign in to comment.