mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Refactor to eliminate global variable dependencies
Removes the use of global variables for paths and architecture settings. Instead, these values are now passed explicitly as parameters to the relevant functions. This change improves code clarity, reduces the risk of side effects, and makes the functions more modular and easier to test.
This commit is contained in:
@@ -593,8 +593,8 @@ function Start-WingetAppDownloadTask {
|
||||
}
|
||||
|
||||
try {
|
||||
# Call Get-Application (ensure it's available via dot-sourcing and uses $global:LogFile)
|
||||
$resultCode = Get-Application -AppName $appName -AppId $appId -Source $source -ErrorAction Stop
|
||||
# Call Get-Application
|
||||
$resultCode = Get-Application -AppName $appName -AppId $appId -Source $source -AppsPath $AppsPath -WindowsArch $WindowsArch -OrchestrationPath $OrchestrationPath -ErrorAction Stop
|
||||
|
||||
# Determine status based on result code
|
||||
switch ($resultCode) {
|
||||
|
||||
Reference in New Issue
Block a user