From 84f212c8f6cebd932d5af3adc2d36196ba998df5 Mon Sep 17 00:00:00 2001 From: Richard Kuhnt Date: Mon, 30 Jan 2017 19:38:02 +0100 Subject: [PATCH] Remove -SkipLast to restore Powershell 3 compatibility (fixes #1278) Remove -SkipLast to restore Powershell 3 compatibility (fixes #1278) --- lib/autoupdate.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/autoupdate.ps1 b/lib/autoupdate.ps1 index 4e815095d..ea3910ada 100644 --- a/lib/autoupdate.ps1 +++ b/lib/autoupdate.ps1 @@ -141,7 +141,8 @@ function get_version_substitutions([String] $version, [Hashtable] $matches) '$buildVersion' = $firstPart.Split('.') | Select-Object -skip 3 -first 1; '$preReleaseVersion' = $lastPart; } - $matches.GetEnumerator() | Select -SkipLast 1 | % { + $matches.Remove(0) + $matches.GetEnumerator() | % { $versionVariables.Add('$match' + (Get-Culture).TextInfo.ToTitleCase($_.Name), $_.Value) } return $versionVariables