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()]