Skip to content

os/mac/keg_relocate: be stricter about preferred_perl#21501

Merged
MikeMcQuaid merged 1 commit intomainfrom
preferred_perl_version_stricter
Feb 2, 2026
Merged

os/mac/keg_relocate: be stricter about preferred_perl#21501
MikeMcQuaid merged 1 commit intomainfrom
preferred_perl_version_stricter

Conversation

@MikeMcQuaid
Copy link
Copy Markdown
Member

Ensure that we validate the format here.

Ensure that we validate the format here.
Copy link
Copy Markdown
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@MikeMcQuaid MikeMcQuaid enabled auto-merge February 2, 2026 14:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves validation for the preferred_perl field in keg relocation logic by enforcing a stricter format check. The change ensures that the preferred Perl version follows the expected pattern before being used, preventing potential issues with malformed version strings.

Changes:

  • Added format validation for preferred_perl using a regex pattern to ensure it matches the expected \d+\.\d+ format
  • Restructured the conditional logic to validate both the presence and format of preferred_perl before using it
  • Removed the fallback logic that would use MacOS.preferred_perl_version when the perl_path doesn't exist

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Feb 2, 2026
Merged via the queue into main with commit 70b5921 Feb 2, 2026
37 checks passed
@MikeMcQuaid MikeMcQuaid deleted the preferred_perl_version_stricter branch February 2, 2026 15:08
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.

3 participants