Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 15, 2025

Addresses feedback on #4066 regarding Register-PSRepository -Default failing when the repository is already registered.

Changes

  • Check if PSGallery exists before attempting registration to prevent duplicate registration errors
  • Maintain error visibility for actual registration failures by only suppressing errors on the existence check
# Before
Register-PSRepository -Default

# After
if (-not (Get-PSRepository -Name 'PSGallery' -ErrorAction SilentlyContinue)) {
    Register-PSRepository -Default
}

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Update release pipeline based on feedback Add error handling for PSGallery repository registration Dec 15, 2025
Copilot AI requested a review from mazhelez December 15, 2025 12:35
@mazhelez mazhelez marked this pull request as ready for review December 15, 2025 12:37
@mazhelez mazhelez requested a review from a team as a code owner December 15, 2025 12:37
@mazhelez mazhelez merged commit 12b85cd into mazhelez/release-pipeline-v2 Dec 15, 2025
1 check passed
@mazhelez mazhelez deleted the copilot/sub-pr-4066 branch December 15, 2025 12:37
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.

2 participants