Skip to content

Why does Publish error handling check for a magic NugetApiKey? #61

@Jaykul

Description

@Jaykul

In the error handling for Publish-PSArtifactUtility there is a test for $NugetApiKey -eq 'VSTS' which is driving me crazy.

Under what circumstances does that actually come up? Doesn't it require that users know to use "VSTS" as a magical API key, but not know why they should do so? I mean, if they knew what they were doing it, they would not get this error, right? So it seems this only happens if they coincidentally guess at the APIKey.

I appreciate the attempt, and the error message is very useful.

Perhaps you could just be match the $errorMsg? Or even just test for "visualstudio.com" in the URL instead?

One final thought: could that error message (and/or the web url) be updated to include instructions for registering the URL from the command line?

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