Skip to content

Conversation

@anamnavi
Copy link
Member

@anamnavi anamnavi commented Nov 24, 2025

Utils.ProcessNameWildcards detects and potentially filters out wildcard characters and unwanted characters from Name input. Save-PSResource and other cmdlets call this method. This method will now also filter out path separator characters at the start of a package name, if present, and write an appropriate error message. When a path separator is present at the start some servers (like V3 API ones) ignore or filter it out, and make a successful request for the package but then our own comparisons against the package name later fail, so it is better to filter out path separators at the start and be clearer with the error.

PR Summary

PR Context

Fixes #1901

PR Checklist

@anamnavi
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anamnavi
Copy link
Member Author

anamnavi commented Dec 2, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anamnavi anamnavi requested a review from alerickson December 4, 2025 19:07
@anamnavi anamnavi merged commit 06b4384 into master Dec 4, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Save-PSResource: Improve error message when passing bad package name that looks like a filename

3 participants