Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
freddydk committed Nov 23, 2023
1 parent ee72ec0 commit a8362a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Actions/CheckForUpdates/CheckForUpdates.HelperFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ function UpdateSettingsFile {
Param(
[string] $settingsFile,
[hashtable] $updateSettings,
[hashtable] $otherSettings = @{}
[hashtable] $additionalSettings = @{}
)

# Update Repo Settings file with the template URL
Expand All @@ -332,11 +332,11 @@ function UpdateSettingsFile {
$settings | Add-Member -MemberType NoteProperty -Name "$key" -Value $updateSettings."$key"
}
}
# Grab settings from otherSettings if they are not already in settings
foreach($key in $otherSettings.Keys) {
# Grab settings from additionalSettings if they are not already in settings
foreach($key in $additionalSettings.Keys) {
if (!($settings.PSObject.Properties.Name -eq $key)) {
# Add the property if it doesn't exist
$settings | Add-Member -MemberType NoteProperty -Name "$key" -Value $otherSettings."$key"
$settings | Add-Member -MemberType NoteProperty -Name "$key" -Value $additionalSettings."$key"
}
}
# Save the file with LF line endings and UTF8 encoding
Expand Down

0 comments on commit a8362a3

Please sign in to comment.