mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Refactor: Remove redundant Success property assignment
Removes the logic that adds a `Success` property to the returned object when an existing driver package is found. This property is handled by the calling function, making this assignment unnecessary and simplifying the driver-saving task functions.
This commit is contained in:
@@ -208,11 +208,6 @@ function Save-DellDriversTask {
|
||||
if ($null -ne $ProgressQueue) { Invoke-ProgressUpdate -ProgressQueue $ProgressQueue -Identifier $modelName -Status $existingDriver.Status }
|
||||
}
|
||||
|
||||
# Ensure the Success property exists on the object being returned.
|
||||
if (-not $existingDriver.PSObject.Properties.Name -contains 'Success') {
|
||||
$existingDriver | Add-Member -MemberType NoteProperty -Name 'Success' -Value $true
|
||||
}
|
||||
|
||||
return $existingDriver
|
||||
}
|
||||
|
||||
|
||||
@@ -152,11 +152,6 @@ function Save-HPDriversTask {
|
||||
if ($null -ne $ProgressQueue) { Invoke-ProgressUpdate -ProgressQueue $ProgressQueue -Identifier $identifier -Status $existingDriver.Status }
|
||||
}
|
||||
|
||||
# Ensure the Success property exists on the object being returned.
|
||||
if (-not $existingDriver.PSObject.Properties.Name -contains 'Success') {
|
||||
$existingDriver | Add-Member -MemberType NoteProperty -Name 'Success' -Value $true
|
||||
}
|
||||
|
||||
return $existingDriver
|
||||
}
|
||||
|
||||
|
||||
@@ -126,11 +126,6 @@ function Save-LenovoDriversTask {
|
||||
if ($null -ne $ProgressQueue) { Invoke-ProgressUpdate -ProgressQueue $ProgressQueue -Identifier $identifier -Status $existingDriver.Status }
|
||||
}
|
||||
|
||||
# Ensure the Success property exists on the object being returned.
|
||||
if (-not $existingDriver.PSObject.Properties.Name -contains 'Success') {
|
||||
$existingDriver | Add-Member -MemberType NoteProperty -Name 'Success' -Value $true
|
||||
}
|
||||
|
||||
return $existingDriver
|
||||
}
|
||||
|
||||
|
||||
@@ -132,11 +132,6 @@ function Save-MicrosoftDriversTask {
|
||||
if ($null -ne $ProgressQueue) { Invoke-ProgressUpdate -ProgressQueue $ProgressQueue -Identifier $modelName -Status $existingDriver.Status }
|
||||
}
|
||||
|
||||
# Ensure the Success property exists on the object being returned.
|
||||
if (-not $existingDriver.PSObject.Properties.Name -contains 'Success') {
|
||||
$existingDriver | Add-Member -MemberType NoteProperty -Name 'Success' -Value $true
|
||||
}
|
||||
|
||||
return $existingDriver
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user