From 4478d010d696c270cc9cbd2d61b365679d70db73 Mon Sep 17 00:00:00 2001 From: silverqx Date: Thu, 15 Aug 2024 00:38:41 +0200 Subject: [PATCH] tools bugfix Position to 0 --- tools/qvcpkg-hash.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/qvcpkg-hash.ps1 b/tools/qvcpkg-hash.ps1 index 99df07564..998dfeb12 100644 --- a/tools/qvcpkg-hash.ps1 +++ b/tools/qvcpkg-hash.ps1 @@ -2,20 +2,20 @@ [CmdletBinding(DefaultParameterSetName = 'Ref')] Param( - [Parameter(Position = 1, ParameterSetName = 'Branch', ValueFromPipeline, + [Parameter(Position = 0, ParameterSetName = 'Branch', ValueFromPipeline, ValueFromPipelineByPropertyName, HelpMessage = 'Specifies a branch for which to download the package archive (works with ' + 'a commit ID too).')] [ValidateNotNullOrEmpty()] [string] $Branch = 'main', - [Parameter(Position = 1, Mandatory, ParameterSetName = 'Tag', ValueFromPipeline, + [Parameter(Position = 0, Mandatory, ParameterSetName = 'Tag', ValueFromPipeline, ValueFromPipelineByPropertyName, HelpMessage = 'Specifies a tag for which to download the package archive.')] [ValidateNotNullOrEmpty()] [string] $Tag, - [Parameter(Position = 1, Mandatory, ParameterSetName = 'Commit', ValueFromPipeline, + [Parameter(Position = 0, Mandatory, ParameterSetName = 'Commit', ValueFromPipeline, ValueFromPipelineByPropertyName, HelpMessage = 'Specifies a commit ID for which to download the package archive.')] [ValidateNotNullOrEmpty()] @@ -24,7 +24,7 @@ Param( 'The argument "{0}" does not match the "{1}" pattern.')] [string] $Commit, - [Parameter(Position = 1, Mandatory, ParameterSetName = 'Ref', ValueFromPipeline, + [Parameter(Position = 0, Mandatory, ParameterSetName = 'Ref', ValueFromPipeline, ValueFromPipelineByPropertyName, HelpMessage = 'Specifies a git object, it can be the tag, commit ID, or branch.')] [ValidateNotNullOrEmpty()]