mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-06-28 09:04:47 -05:00
Choco Logic Refactor and Add Checkbox to prefer Chocolatey over Winget (#2596)
* First Selector and Logic * Extend Functionality * Switch to PreferChocolatey Checkbox * Persist Choco Preference across program restarts * Change Logging, Fix interactivity and optimize uninstall * Implement "Get-Installed" (quick-and-dirty) * Code Formatting * Rename File/Function, Refactor Choco Install, Add Status Indicator * Add documentation --------- Co-authored-by: Chris Titus <contact@christitus.com>
This commit is contained in:
@ -13,6 +13,16 @@ Function Invoke-WinUtilCurrentSystem {
|
||||
param(
|
||||
$CheckBox
|
||||
)
|
||||
if ($CheckBox -eq "choco") {
|
||||
$apps = (choco list | Select-String -Pattern "^\S+").Matches.Value
|
||||
$filter = Get-WinUtilVariables -Type Checkbox | Where-Object {$psitem -like "WPFInstall*"}
|
||||
$sync.GetEnumerator() | Where-Object {$psitem.Key -in $filter} | ForEach-Object {
|
||||
$dependencies = @($sync.configs.applications.$($psitem.Key).choco -split ";")
|
||||
if ($dependencies -in $apps) {
|
||||
Write-Output $psitem.name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($checkbox -eq "winget") {
|
||||
|
||||
|
Reference in New Issue
Block a user