marticliment / UniGetUI

UniGetUI: The Graphical Interface for your package managers. Could be terribly described as a package manager manager to manage your package managers
https://www.marticliment.com/unigetui/
MIT License
13.25k stars 459 forks source link

[BUG] Installation options are not saved and get corrupt in some circumstances #2145

Closed Kroji closed 5 months ago

Kroji commented 7 months ago

Please confirm these before moving forward

Describe your issue

Hi, I'm having problems when editing installation options for some of my packages.

I wanted to have all of them as interactively installed/updated. But while testing some configuration changes, eventually the installation options UI stopped working (apparently I was still able to change options, but when clicking "Save and Close" they are not saved and revert to defaults).

I tried the following on a fresh installation:

  1. Start a fresh WingetUI instance.
  2. Selecting a random already-installed Winget origin package (7zip.7zip in my case).
  3. Enabling "Interactive installation" on installation options and saving.
  4. Disabling "Interactive installation" on installation options and saving.
  5. Enabling (again) "Interactive installation" on installation options and saving.
  6. Try to edit installation options again.

After step 4 any tried option change is not saved, and a exception appears in the log (see the "WingetUI Log").

As far as I can see, there may be an issue in the way the installation options are saved in .wingetui folder. It seems installation options for a specific package are stored in a file located in .wingetui/InstallationOptions/Winget.[package_id].json.

This is the content of my .wingetui/InstallationOptions/Winget.7zip.7zip.json when I perform step 3:

{"SkipHashCheck":false,"InteractiveInstallation":false,"RunAsAdministrator":false,"Architecture":"","InstallationScope":"","CustomParameters":[""],"PreRelease":false,"CustomInstallLocation":"","Version":""}

This is the file's content on step 4:

{"SkipHashCheck":false,"InteractiveInstallation":true,"RunAsAdministrator":false,"Architecture":"","InstallationScope":"","CustomParameters":[""],"PreRelease":false,"CustomInstallLocation":"","Version":""}}

Note the extra } at the end, seems the app is overwriting the file's content on save instead of actually change/replace it, which causes file corruption and future reading errors.

Found on latest WingetUI 3.0.2.

Steps to reproduce the issue

  1. Start a fresh WingetUI instance.
  2. Selecting a random already-installed Winget origin package.
  3. Enable "Interactive installation" on installation options and save.
  4. Disable "Interactive installation" on installation options and save.
  5. Enable (again) "Interactive installation" on installation options and save.
  6. Try to edit installation options again. Issue should be reproduced at this point.

WingetUI Log

Welcome to WingetUI Version 3.0.2
               Version Code 3,02
C:\Users\Adri\AppData\Local\WingetUI\CachedLangFiles\lang_es.json
Loaded language locale: es
Api auth token: v2e71y48ycdlmy4l1m8j1g37845sjcgggovxwnqf3ortius13n4zysop672wq0c5
Starting update check
Api running on http://localhost:7058
Lang files were updated successfully
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Npm
█ Enabled: True
█ Found: False
█ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
█ INSTALLED OR IT HAS BEEN MISCONFIGURED 
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: .NET Tool
█ Enabled: True
█ Found: False
█ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
█ INSTALLED OR IT HAS BEEN MISCONFIGURED 
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Downloaded icons and screenshots successfully!
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Pip
█ Enabled: True
█ Found: True
█ Fancye exe name: pip
█ Executable path: C:\Users\Adri\AppData\Local\Microsoft\WindowsApps\python.exe
█ Call arguments:  -m pip
█ Version: 
█   
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
WingetUI is up to date
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Scoop
█ Enabled: True
█ Found: False
█ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
█ INSTALLED OR IT HAS BEEN MISCONFIGURED 
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Adding chocolatey to path
System.TimeoutException: The operation has timed out.
   at ModernWindow.MainApp.InitializeAllManagersAsync() in C:\Users\marti\Desktop\wingetui-tempo\src\wingetui\App.xaml.cs:line 252
Timeout: Not all package managers have finished initializing.
LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
PowerShell sources took too long to load, using known sources as default
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: PowerShell
█ Enabled: True
█ Found: True
█ Fancye exe name: powershell.exe
█ Executable path: C:\Windows\system32\windowspowershell\v1.0\powershell.exe
█ Call arguments:  -NoProfile -Command
█ Version: 
█   Name                           Value                                                                                   
█   ----                           -----                                                                                   
█   PSVersion                      5.1.19041.4170                                                                          
█   PSEdition                      Desktop                                                                                 
█   PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
█   BuildVersion                   10.0.19041.4170                                                                         
█   CLRVersion                     4.0.30319.42000                                                                         
█   WSManStackVersion              3.0                                                                                     
█   PSRemotingProtocolVersion      2.3                                                                                     
█   SerializationVersion           1.1.0.1
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Winget
█ Enabled: True
█ Found: True
█ Fancye exe name: winget.exe
█ Executable path: C:\Program Files\WingetUI\PackageEngine\Managers\winget-cli_x64\winget.exe
█ Call arguments: 
█ Version: 
█   v1.7.10582
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Chocolatey
█ Enabled: True
█ Found: True
█ Fancye exe name: choco.exe
█ Executable path: C:\Users\Adri\AppData\Local\Programs\WingetUI\choco-cli\choco.exe
█ Call arguments: 
█ Version: 
█   2.2.2
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Invalid value for UpdatesCheckInterval, using default value of 3600 seconds
   - 
  ███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  1024 KB / 9.97 MB
  ██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  2.00 MB / 9.97 MB
  █████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  3.00 MB / 9.97 MB
  ████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  4.00 MB / 9.97 MB
  ███████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  5.00 MB / 9.97 MB
  ██████████████████▒▒▒▒▒▒▒▒▒▒▒▒  6.00 MB / 9.97 MB
  █████████████████████▒▒▒▒▒▒▒▒▒  7.00 MB / 9.97 MB
  ████████████████████████▒▒▒▒▒▒  8.00 MB / 9.97 MB
  ███████████████████████████▒▒▒  9.00 MB / 9.97 MB
  ██████████████████████████████  9.97 MB / 9.97 MB
Found 7-Zip [7zip.7zip]
Version: 23.01
Publisher: Igor Pavlov
Publisher Url: https://www.7-zip.org
Publisher Support Url: https://www.7-zip.org/support.html
Author: Igor Pavlov
Moniker: 7zip
Description: Free and open source file archiver with a high compression ratio.
Homepage: https://www.7-zip.org
License: GNU LGPL
License Url: https://www.7-zip.org/license.txt
Copyright: Copyright (C) 1999-2023 Igor Pavlov.
Copyright Url: https://www.7-zip.org/license.txt
Tags:
  archiver
  compression
  file-compression
  foss
  open-source
  tool
  utility
Installer:
  No applicable installer found; see logs for more details.
Winget could not found culture data for package Id=7zip.7zip and Culture=es-ES. Trying to get data for en-US
   - 
  ███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  1024 KB / 9.97 MB
  ██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  2.00 MB / 9.97 MB
  █████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  3.00 MB / 9.97 MB
  ████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  4.00 MB / 9.97 MB
  ███████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  5.00 MB / 9.97 MB
  ██████████████████▒▒▒▒▒▒▒▒▒▒▒▒  6.00 MB / 9.97 MB
  █████████████████████▒▒▒▒▒▒▒▒▒  7.00 MB / 9.97 MB
  ████████████████████████▒▒▒▒▒▒  8.00 MB / 9.97 MB
  ███████████████████████████▒▒▒  9.00 MB / 9.97 MB
  ██████████████████████████████  9.97 MB / 9.97 MB
Found 7-Zip [7zip.7zip]
Version: 23.01
Publisher: Igor Pavlov
Publisher Url: https://www.7-zip.org
Publisher Support Url: https://www.7-zip.org/support.html
Author: Igor Pavlov
Moniker: 7zip
Description: Free and open source file archiver with a high compression ratio.
Homepage: https://www.7-zip.org
License: GNU LGPL
License Url: https://www.7-zip.org/license.txt
Copyright: Copyright (C) 1999-2023 Igor Pavlov.
Copyright Url: https://www.7-zip.org/license.txt
Tags:
  archiver
  compression
  file-compression
  foss
  open-source
  tool
  utility
Installer:
  Installer Type: wix
  Installer Locale: en-US
  Installer Url: https://www.7-zip.org/a/7z2301-x64.msi
  Installer SHA256: 0ba639b6dacdf573d847c911bd147c6384381a54dac082b1e8c77bc73d58958b
Received info ModernWindow.PackageEngine.Classes.PackageDetails
System.Text.Json.JsonException: '}' is invalid after a single JSON value. Expected end of data. Path: $ | LineNumber: 0 | BytePositionInLine: 205.
 ---> System.Text.Json.JsonReaderException: '}' is invalid after a single JSON value. Expected end of data. LineNumber: 0 | BytePositionInLine: 205.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.ConsumeNextToken(Byte marker)
   at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
   at System.Text.Json.Utf8JsonReader.Read()
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   --- End of inner exception stack trace ---
   at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.ContinueDeserialize(ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.Deserialize(Stream utf8Json)
   at ModernWindow.PackageEngine.Classes.InstallationOptions.LoadOptionsFromDisk() in C:\Users\marti\Desktop\wingetui-tempo\src\wingetui\PackageEngine\Classes\Package.cs:line 724

Package Managers Logs

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:28] PowerShell ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Windows\system32\windowspowershell\v1.0\powershell.exe
█  Arguments:  -NoProfile -Command Get-PSRepository
ADVERTENCIA: MSG:UnableToDownload �https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409� ��
ADVERTENCIA: No se puede descargar la lista de proveedores disponibles. Comprueba tu conexi�n a Internet.
ADVERTENCIA: No se encuentran los or�genes de paquetes.
[17/04/2024 17:45:28] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:28] Winget ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Program Files\WingetUI\PackageEngine\Managers\winget-cli_x64\winget.exe
█  Arguments:  source list
Name    Argument
-----------------------------------------------------
msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0
winget  https://cdn.winget.microsoft.com/cache
[17/04/2024 17:45:28] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:28] Winget ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Program Files\WingetUI\PackageEngine\Managers\winget-cli_x64\winget.exe
█  Arguments:  source list
Name    Argument
-----------------------------------------------------
msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0
winget  https://cdn.winget.microsoft.com/cache
[17/04/2024 17:45:28] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:28] Pip ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Users\Adri\AppData\Local\Microsoft\WindowsApps\python.exe
█  Arguments:  -m pip list --outdated
No se encontró Python; ejecuta sin argumentos para instalar desde Microsoft Store o deshabilita este acceso directo en Configuración > Administrar alias de ejecución de la aplicación.
[17/04/2024 17:45:28] Exit Code: 9009
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:28] Pip ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Users\Adri\AppData\Local\Microsoft\WindowsApps\python.exe
█  Arguments:  -m pip list
No se encontró Python; ejecuta sin argumentos para instalar desde Microsoft Store o deshabilita este acceso directo en Configuración > Administrar alias de ejecución de la aplicación.
[17/04/2024 17:45:28] Exit Code: 9009
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:28] Chocolatey ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Users\Adri\AppData\Local\Programs\WingetUI\choco-cli\choco.exe
█  Arguments:  source list
Chocolatey v2.2.2
chocolatey - https://community.chocolatey.org/api/v2/ | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.
[17/04/2024 17:45:28] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:29] Chocolatey ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Users\Adri\AppData\Local\Programs\WingetUI\choco-cli\choco.exe
█  Arguments:  source list
Chocolatey v2.2.2
chocolatey - https://community.chocolatey.org/api/v2/ | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.
[17/04/2024 17:45:29] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:29] Chocolatey ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Users\Adri\AppData\Local\Programs\WingetUI\choco-cli\choco.exe
█  Arguments:  outdated
Chocolatey v2.2.2
Outdated Packages
 Output is package name | current version | available version | pinned?
Chocolatey has determined 0 package(s) are outdated. 
[17/04/2024 17:45:29] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:29] Chocolatey ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Users\Adri\AppData\Local\Programs\WingetUI\choco-cli\choco.exe
█  Arguments:  list
Chocolatey v2.2.2
0 packages installed.
[17/04/2024 17:45:29] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:29] PowerShell ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Windows\system32\windowspowershell\v1.0\powershell.exe
█  Arguments:  -NoProfile -Command Get-PSRepository
ADVERTENCIA: MSG:UnableToDownload �https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409� ��
ADVERTENCIA: No se puede descargar la lista de proveedores disponibles. Comprueba tu conexi�n a Internet.
ADVERTENCIA: No se encuentran los or�genes de paquetes.
[17/04/2024 17:45:29] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:29] Winget ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Program Files\WingetUI\PackageEngine\Managers\winget-cli_x64\winget.exe
█  Arguments:  update --include-unknown  --accept-source-agreements
  ███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  1024 KB / 9.97 MB
  ██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  2.00 MB / 9.97 MB
  █████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  3.00 MB / 9.97 MB
  ████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  4.00 MB / 9.97 MB
  ███████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  5.00 MB / 9.97 MB
  ██████████████████▒▒▒▒▒▒▒▒▒▒▒▒  6.00 MB / 9.97 MB
  █████████████████████▒▒▒▒▒▒▒▒▒  7.00 MB / 9.97 MB
  ████████████████████████▒▒▒▒▒▒  8.00 MB / 9.97 MB
  ███████████████████████████▒▒▒  9.00 MB / 9.97 MB
  ██████████████████████████████  9.97 MB / 9.97 MB
   - 
Name                                               Id                                Version       Available     Source
-----------------------------------------------------------------------------------------------------------------------
Microsoft Visual C++ 2015 UWP Desktop Runtime Pac… Microsoft.VCLibs.Desktop.14       14.0.30704.0  14.0.33321.0  winget
Terminal Windows                                   Microsoft.WindowsTerminal         1.16.10261.0  1.19.10821.0  winget
Password Safe (64-bit)                             RonyShapiro.PasswordSafe          3.61.0        3.64.0        winget
Sublime Text                                       SublimeHQ.SublimeText.4           Unknown       4.0.0.416900  winget
Microsoft Visual C++ 2013 Redistributable (x64) -… Microsoft.VCRedist.2013.x64       12.0.30501.0  12.0.40664.0  winget
Microsoft Visual C++ 2015-2022 Redistributable (x… Microsoft.VCRedist.2015+.x86      14.36.32532.0 14.38.33135.0 winget
Microsoft Visual Studio Code (User)                Microsoft.VisualStudioCode        1.77.3        1.88.1        winget
Microsoft Visual C++ 2015-2022 Redistributable (x… Microsoft.VCRedist.2015+.x64      14.36.32532.0 14.38.33135.0 winget
PDF-XChange Editor                                 TrackerSoftware.PDF-XChangeEditor 9.5.368.0     10.2.1.385    winget
PowerShell 7.4.1.0-x64                             Microsoft.PowerShell              7.4.1.0       7.4.2.0       winget
10 upgrades available.
[17/04/2024 17:45:29] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:29] PowerShell ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Windows\system32\windowspowershell\v1.0\powershell.exe
█  Arguments:  -NoProfile -Command Get-InstalledModule
ADVERTENCIA: MSG:UnableToDownload �https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409� ��
ADVERTENCIA: No se puede descargar la lista de proveedores disponibles. Comprueba tu conexi�n a Internet.
[17/04/2024 17:45:29] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:30] PowerShell ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Windows\system32\windowspowershell\v1.0\powershell.exe
█  Arguments: 
Windows PowerShell
Copyright (C) Microsoft Corporation. Todos los derechos reservados.
Prueba la nueva tecnolog�a PowerShell multiplataforma https://aka.ms/pscore6
PS C:\Program Files\WingetUI> 
PS C:\Program Files\WingetUI>                 function Test-GalleryModuleUpdate {
>>                     param (
>>                         [Parameter(Mandatory,ValueFromPipelineByPropertyName)] [string] $Name,
>>                         [Parameter(Mandatory,ValueFromPipelineByPropertyName)] [version] $Version,
>>                         [Parameter(Mandatory,ValueFromPipelineByPropertyName)] [string] $Repository,
>>                         [switch] $NeedUpdateOnly
>>                     )
>>                     process {
>>                         $URLs = @{}
>>                         @(Get-PSRepository).ForEach({$URLs[$_.Name] = $_.SourceLocation})
>>                         $page = Invoke-WebRequest -Uri ($URLs[$Repository] + "/package/$Name") -UseBasicParsing -Maximum 0 -ea Ignore
>>                         [version]$latest = Split-Path -Path ($page.Headers.Location -replace "$Name." -replace ".nupkg") -Leaf
>>                         $needsupdate = $Latest -gt $Version
>>                         if ($needsupdate) {
>>                                 Write-Output($Name + "|" + $Version.ToString() + "|" + $Latest.ToString() + "|" + $Repository)
>>                         }
>>                     }
>>                 }
>>                 Get-InstalledModule | Test-GalleryModuleUpdate
ADVERTENCIA: MSG:UnableToDownload �https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409� ��
ADVERTENCIA: No se puede descargar la lista de proveedores disponibles. Comprueba tu conexi�n a Internet.
PS C:\Program Files\WingetUI>                 exit
[17/04/2024 17:45:30] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:30] Winget ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Program Files\WingetUI\PackageEngine\Managers\winget-cli_x64\winget.exe
█  Arguments:  list  --accept-source-agreements
   \ 
  ███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  1024 KB / 9.97 MB
  ██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  2.00 MB / 9.97 MB
  █████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  3.00 MB / 9.97 MB
  ████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  4.00 MB / 9.97 MB
  ███████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  5.00 MB / 9.97 MB
  ██████████████████▒▒▒▒▒▒▒▒▒▒▒▒  6.00 MB / 9.97 MB
  █████████████████████▒▒▒▒▒▒▒▒▒  7.00 MB / 9.97 MB
  ████████████████████████▒▒▒▒▒▒  8.00 MB / 9.97 MB
  ███████████████████████████▒▒▒  9.00 MB / 9.97 MB
  ██████████████████████████████  9.97 MB / 9.97 MB
   - 
Name                                    Id                                       Version            Available    Source
-----------------------------------------------------------------------------------------------------------------------
[Redacted due to personal information, please ask me for this if it is needed]        
[17/04/2024 17:45:30] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:45] Winget ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Program Files\WingetUI\PackageEngine\Managers\winget-cli_x64\winget.exe
█  Arguments:  show --id 7zip.7zip --exact --versions --accept-source-agreements
   \ 
  ███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  1024 KB / 9.97 MB
  ██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  2.00 MB / 9.97 MB
  █████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  3.00 MB / 9.97 MB
  ████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  4.00 MB / 9.97 MB
  ███████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  5.00 MB / 9.97 MB
  ██████████████████▒▒▒▒▒▒▒▒▒▒▒▒  6.00 MB / 9.97 MB
  █████████████████████▒▒▒▒▒▒▒▒▒  7.00 MB / 9.97 MB
  ████████████████████████▒▒▒▒▒▒  8.00 MB / 9.97 MB
  ███████████████████████████▒▒▒  9.00 MB / 9.97 MB
  ██████████████████████████████  9.97 MB / 9.97 MB
Found 7-Zip [7zip.7zip]
Version
----------
22.01
21.07
19.00.00.0
[17/04/2024 17:45:45] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:49] Winget ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Program Files\WingetUI\PackageEngine\Managers\winget-cli_x64\winget.exe
█  Arguments:  show --id 7zip.7zip --exact --versions --accept-source-agreements
  ███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  1024 KB / 9.97 MB
  ██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  2.00 MB / 9.97 MB
  █████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  3.00 MB / 9.97 MB
  ████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  4.00 MB / 9.97 MB
  ███████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  5.00 MB / 9.97 MB
  ██████████████████▒▒▒▒▒▒▒▒▒▒▒▒  6.00 MB / 9.97 MB
  █████████████████████▒▒▒▒▒▒▒▒▒  7.00 MB / 9.97 MB
  ████████████████████████▒▒▒▒▒▒  8.00 MB / 9.97 MB
  ███████████████████████████▒▒▒  9.00 MB / 9.97 MB
  ██████████████████████████████  9.97 MB / 9.97 MB
Found 7-Zip [7zip.7zip]
Version
----------
22.01
21.07
19.00.00.0
[17/04/2024 17:45:49] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:52] Winget ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Program Files\WingetUI\PackageEngine\Managers\winget-cli_x64\winget.exe
█  Arguments:  show --id 7zip.7zip --exact --versions --accept-source-agreements
  ███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  1024 KB / 9.97 MB
  ██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  2.00 MB / 9.97 MB
  █████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  3.00 MB / 9.97 MB
  ████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  4.00 MB / 9.97 MB
  ███████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  5.00 MB / 9.97 MB
  ██████████████████▒▒▒▒▒▒▒▒▒▒▒▒  6.00 MB / 9.97 MB
  █████████████████████▒▒▒▒▒▒▒▒▒  7.00 MB / 9.97 MB
  ████████████████████████▒▒▒▒▒▒  8.00 MB / 9.97 MB
  ███████████████████████████▒▒▒  9.00 MB / 9.97 MB
  ██████████████████████████████  9.97 MB / 9.97 MB
Found 7-Zip [7zip.7zip]
Version
----------
22.01
21.07
19.00.00.0
[17/04/2024 17:45:52] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:56] Winget ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Program Files\WingetUI\PackageEngine\Managers\winget-cli_x64\winget.exe
█  Arguments:  show --id 7zip.7zip --exact --versions --accept-source-agreements
  ███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  1024 KB / 9.97 MB
  ██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  2.00 MB / 9.97 MB
  █████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  3.00 MB / 9.97 MB
  ████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  4.00 MB / 9.97 MB
  ███████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  5.00 MB / 9.97 MB
  ██████████████████▒▒▒▒▒▒▒▒▒▒▒▒  6.00 MB / 9.97 MB
  █████████████████████▒▒▒▒▒▒▒▒▒  7.00 MB / 9.97 MB
  ████████████████████████▒▒▒▒▒▒  8.00 MB / 9.97 MB
  ███████████████████████████▒▒▒  9.00 MB / 9.97 MB
  ██████████████████████████████  9.97 MB / 9.97 MB
Found 7-Zip [7zip.7zip]
Version
----------
22.01
21.07
19.00.00.0
[17/04/2024 17:45:56] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [17/04/2024 17:45:58] Winget ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Program Files\WingetUI\PackageEngine\Managers\winget-cli_x64\winget.exe
█  Arguments:  show --id 7zip.7zip --exact --versions --accept-source-agreements
  ███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  1024 KB / 9.97 MB
  ██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  2.00 MB / 9.97 MB
  █████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  3.00 MB / 9.97 MB
  ████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  4.00 MB / 9.97 MB
  ███████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  5.00 MB / 9.97 MB
  ██████████████████▒▒▒▒▒▒▒▒▒▒▒▒  6.00 MB / 9.97 MB
  █████████████████████▒▒▒▒▒▒▒▒▒  7.00 MB / 9.97 MB
  ████████████████████████▒▒▒▒▒▒  8.00 MB / 9.97 MB
  ███████████████████████████▒▒▒  9.00 MB / 9.97 MB
  ██████████████████████████████  9.97 MB / 9.97 MB
Found 7-Zip [7zip.7zip]
Version
----------
22.01
21.07
19.00.00.0
[17/04/2024 17:45:58] Exit Code: 0

Relevant information

No response

Screenshots and videos

No response

thakyZ commented 5 months ago

I compiled a local version of this tool repository at hash fdef9e4 and I still get issues like this. I have come to the conclusion that it is because the CustomParameters option incorrectly escapes specific characters. Such as if you have a quote in the CustomParameters installation option it will print it in the JSON file as \u0022 instead of \" like it should, but another workaround is to double escape the initial backslash before the u0022 and that should make it work.

EDIT: Upon further testing it would appear that even single quotes ' are affected as well. On-top of that, I have tested and apparently custom parameters don't always get passed to the winget executable. So I made a new issue for that at #2262

marticliment commented 5 months ago

It does seem to work properly for me...

Can you tell me which package are you using and the custom parameters used?

thakyZ commented 5 months ago

I am using MariaDB.Server as the package and the custom parameters as INSTALLDIR="C:\Program Files\MariaDB"

marticliment commented 5 months ago

Hello @thakyZ, the parameters you passed seem to work fine on the said package. I can store them and read them from disk without any issues.

Could you please try again the latest head?