Skip to content

Meaningful error handling when repository not registered #1827

@VeryEarly

Description

@VeryEarly

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

Steps to reproduce

Publish-PSResource -NupkgPath $path -Repository "111" -ModulePrefix "public/psresource" -debug
Publish-PSResource: A parameter cannot be found that matches parameter name 'ModulePrefix'.

Expected behavior

should print meaningful error such as "repository xxx was not registered" or such

Actual behavior

when using -ModulePrefix with `-NupkgPath` and `-Repository`; if repository was not registered it printed cannot find parameter 'ModulePrefix'

Error details

Environment data

Binary     1.1.1                 Microsoft.PowerShell.PSResourceGet

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions