microsoft / winget-create

The Windows Package Manager Manifest Creator command-line tool (aka wingetcreate)
MIT License
477 stars 82 forks source link

Passing URL string with a variable #449

Closed PckgrBot closed 4 months ago

PckgrBot commented 10 months ago

Brief description of your issue

Hi,

Just trying to build some automation for updating packages and I can't seem to be able to pass multiple urls via a variable. I'm getting this

Too many overrides specified for the following installer URL: https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise.msi|user https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise.msi|machine https://dl.google .com/dl/chrome/install/googlechromestandaloneenterprise64.msi|user https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise64.msi|machine

The output of the variable is this:

$urls "https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise.msi|user" "https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise.msi|machine" "https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise64 .msi|user" "https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise64.msi|machine"

If I manually paste that string into Wingetcreate it works. Any idea what I might be doing wrong?

Steps to reproduce

Pass a string of urls as a variable in Wingetcreate

Expected behavior

It should pass successfully

Actual behavior

Error in description

Environment

Windows Package Manager v1.5.2201
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22621.2283
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.20.2201.0

Winget Directories                 
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages

Links               
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled