From 49b7297d1eab71139ac6ebaf32b857133c06f0a8 Mon Sep 17 00:00:00 2001 From: Klaus Dandl <76051010+Utesgui@users.noreply.github.com> Date: Sat, 11 May 2024 16:36:18 +0000 Subject: [PATCH] Refactor Update-WingetPackage function to use consistent capitalization for the 'With' parameter --- .github/workflows/update-via-script.yml | 3 ++- Scripts/common.ps1 | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-via-script.yml b/.github/workflows/update-via-script.yml index c377bdc..3b21b5f 100644 --- a/.github/workflows/update-via-script.yml +++ b/.github/workflows/update-via-script.yml @@ -15,7 +15,8 @@ jobs: matrix: include: - PackageName: "MongoDB.Server" - WebsiteURL: "https://www.mongodb.com/try/download/community" + WebsiteURL: "https://www.mongodb.com/try/download/community" + With: WinGetCreate - PackageName: "MongoDB.MongoDBCLI" WebsiteURL: "https://www.mongodb.com/try/download/tools" With: WinGetCreate diff --git a/Scripts/common.ps1 b/Scripts/common.ps1 index 6a839cd..2fd3127 100644 --- a/Scripts/common.ps1 +++ b/Scripts/common.ps1 @@ -138,7 +138,7 @@ function Update-WingetPackage { param( [Parameter(Mandatory = $true)] [string] $WebsiteURL, [Parameter(Mandatory = $false)] [string] $wingetPackage = ${Env:PackageName}, - [Parameter(Mandatory = $false)] [ValidateSet("Komac", "WinGetCreate")] [string] $With = "Komac", + [Parameter(Mandatory = $false)][AllowEmptyString()] [ValidateSet("Komac", "WinGetCreate")] [string] $With = "Komac", [Parameter(Mandatory = $false)] [string] $gitToken ) if ($null -eq $gitToken) {