From ab8896961f5ea15e8482bffc961998bd43cd6d93 Mon Sep 17 00:00:00 2001 From: amd64fox <62529699+amd64fox@users.noreply.github.com> Date: Fri, 14 Nov 2025 00:43:49 +0300 Subject: [PATCH] refactor parameter handling in get-build-info.ps1 --- get-build-info.ps1 | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/get-build-info.ps1 b/get-build-info.ps1 index bb928ca..6702a12 100644 --- a/get-build-info.ps1 +++ b/get-build-info.ps1 @@ -1,3 +1,7 @@ +param ( + [string]$Url +) + function Find-BuildInfo { [CmdletBinding()] param ( @@ -37,11 +41,7 @@ function Find-BuildInfo { function Download-And-Unpack-Spotify { [CmdletBinding()] - param ( - [Parameter(Mandatory=$true)] - [string]$Url - ) - + $tempPath = Join-Path ([System.IO.Path]::GetTempPath()) "spotify" $destinationPath = Join-Path $tempPath "unpacked" $exePath = Join-Path $tempPath "SpotifySetup.exe" @@ -81,12 +81,9 @@ function Download-And-Unpack-Spotify { } } -param ( - [string]$Url -) if (-not [string]::IsNullOrEmpty($Url)) { - Download-And-Unpack-Spotify -Url $Url + Download-And-Unpack-Spotify } else { Write-Error "URL не был предоставлен." echo "::set-output name=build_type::false"