diff --git a/Version.ps1 b/Version.ps1 index cb3e455bc..d39ecdb69 100644 --- a/Version.ps1 +++ b/Version.ps1 @@ -64,14 +64,14 @@ try $CommitID = ([string]($env:computername)).substring(0,[math]::min($length,8)).ToLower() } else { + if (!$CommitID) { $CommitID = "---" } + $CommitID = $CommitID -replace '"', '' + $CommitID = $CommitID -replace "'", '' $length = $CommitID.length $CommitID = $CommitID.substring(0,[math]::min($length,8)) } } if (!$CommitID) { $CommitID = "---" } - $CommitID = $CommitID -replace '"', '' - $CommitID = $CommitID -replace "'", '' - if (!$CommitID) { $CommitID = "---" } $Build | Set-Content "Versions\build.txt" $CompleteVer = "$Major.$Minor.$Revis.$Build"