Skip to content

Commit

Permalink
readd handle return
Browse files Browse the repository at this point in the history
  • Loading branch information
MyDrift-user committed Oct 15, 2024
1 parent a97f36f commit 802e830
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion functions/public/Invoke-WPFFeatureInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function Invoke-WPFFeatureInstall {
$Features = (Get-WinUtilCheckBoxes)["WPFFeature"]
}

Invoke-WPFRunspace -ArgumentList $Features -DebugPreference $DebugPreference -ScriptBlock {
$handle = Invoke-WPFRunspace -ArgumentList $Features -DebugPreference $DebugPreference -ScriptBlock {
param($Features, $DebugPreference)
$sync.ProcessRunning = $true
if ($Features.count -eq 1) {
Expand All @@ -39,4 +39,5 @@ function Invoke-WPFFeatureInstall {
Write-Host "--- A Reboot may be required ---"
Write-Host "==================================="
}
return $handle
}
3 changes: 2 additions & 1 deletion functions/public/Invoke-WPFInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function Invoke-WPFInstall {
return
}
$ChocoPreference = $($sync.WPFpreferChocolatey.IsChecked)
Invoke-WPFRunspace -ParameterList @(("PackagesToInstall", $PackagesToInstall),("ChocoPreference", $ChocoPreference)) -DebugPreference $DebugPreference -ScriptBlock {
$handle = Invoke-WPFRunspace -ParameterList @(("PackagesToInstall", $PackagesToInstall),("ChocoPreference", $ChocoPreference)) -DebugPreference $DebugPreference -ScriptBlock {
param($PackagesToInstall, $ChocoPreference, $DebugPreference)
if ($PackagesToInstall.count -eq 1) {
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" })
Expand Down Expand Up @@ -84,4 +84,5 @@ function Invoke-WPFInstall {
}
$sync.ProcessRunning = $False
}
return $handle
}
3 changes: 2 additions & 1 deletion functions/public/Invoke-WPFtweaksbutton.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Invoke-WPFtweaksbutton {
Write-Debug "Number of tweaks to process: $($Tweaks.Count)"

# The leading "," in the ParameterList is nessecary because we only provide one argument and powershell cannot be convinced that we want a nested loop with only one argument otherwise
Invoke-WPFRunspace -ParameterList @(,("tweaks", $tweaks)) -DebugPreference $DebugPreference -ScriptBlock {
$handle = Invoke-WPFRunspace -ParameterList @(,("tweaks", $tweaks)) -DebugPreference $DebugPreference -ScriptBlock {
param(
$tweaks,
$DebugPreference
Expand Down Expand Up @@ -65,4 +65,5 @@ function Invoke-WPFtweaksbutton {
# $MessageIcon = [System.Windows.MessageBoxImage]::Information
# [System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
}
return $handle
}

0 comments on commit 802e830

Please sign in to comment.