Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exception message in cachi2.core.rooted_path.re_root #759

Open
slimreaper35 opened this issue Dec 2, 2024 · 2 comments
Open

Fix exception message in cachi2.core.rooted_path.re_root #759

slimreaper35 opened this issue Dec 2, 2024 · 2 comments
Labels
my first issue Good for newcomers python Pull requests that update Python code
Milestone

Comments

@slimreaper35
Copy link
Member

The exception message in re_root currently states:
Joining path {s_other!r} to {s_self!r}: target is outside {s_root!r}

Proposed change (for example):
Update the message to a more user-friendly tone:
Path {s_self!r}/{s_other!r} outside {s_root!r}, refusing to proceed

Reason for change:
This rewording improves clarity and makes the message more direct and user-appealing.

A/C

  • update the exception message
  • fix unit tests
  • remove asserts for the exact message capture
@slimreaper35 slimreaper35 added my first issue Good for newcomers python Pull requests that update Python code labels Dec 2, 2024
@eskultety
Copy link
Member

Context: #752 (comment)

@eskultety
Copy link
Member

Part of this effort should also be dropping all of the existing occurrences of pattern matching of the PathOutsideRoot exception string in the unit test suite.

@slimreaper35 slimreaper35 added this to the Refactoring milestone Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
my first issue Good for newcomers python Pull requests that update Python code
Projects
None yet
Development

No branches or pull requests

2 participants