Skip to content

Commit

Permalink
use normal variable instead of magic $matches variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
r15ch13 committed Feb 4, 2018
1 parent cb969ae commit d74e0a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/autoupdate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ function update_manifest_prop([String] $prop, $json, [Hashtable] $substitutions)
}
}

function get_version_substitutions([String] $version, [Hashtable] $matches) {
function get_version_substitutions([String] $version, [Hashtable] $customMatches) {
$firstPart = $version.Split('-') | Select-Object -first 1
$lastPart = $version.Split('-') | Select-Object -last 1
$versionVariables = @{
Expand All @@ -218,8 +218,8 @@ function get_version_substitutions([String] $version, [Hashtable] $matches) {
'$buildVersion' = $firstPart.Split('.') | Select-Object -skip 3 -first 1;
'$preReleaseVersion' = $lastPart;
}
if($matches) {
$matches.GetEnumerator() | % {
if($customMatches) {
$customMatches.GetEnumerator() | % {
if($_.Name -ne "0") {
$versionVariables.Add('$match' + (Get-Culture).TextInfo.ToTitleCase($_.Name), $_.Value)
}
Expand Down

0 comments on commit d74e0a8

Please sign in to comment.