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(sfppackage): fix handling of URL-encoded spaces in repository URLs #138

Merged

Conversation

richard-giraud
Copy link

@richard-giraud richard-giraud commented Nov 8, 2024

This fixes #137

If the repository URL includes an URL-encoded space (i.e., %20), sfp install will fail to parse it. The user is presented with a rather unhelpful message:

Error: URL parsing failed.

This PR makes 2 changes:

  • URL-encoded spaces are now supported; and,
  • the error message now includes the affected package and the URL in question.

Error: Invalid repository URL for package '$PACKAGE_NAME': $REPOSITORY_URL

Screenshot from 2024-11-08 09-10-53

A test was added to support the problematic case.

Checklist

All items have to be completed before a PR is merged

  • Adhere to Contribution Guidelines The link is broken.
  • Updates to Decision Records considered? Not needed, I think.
  • Updates to documentation at flxbl-sfp Guide considered? None needed, I think.
  • Tested changes?
  • Unit Tests new and existing passing locally?

@richard-giraud richard-giraud force-pushed the fix/137-repository-url-warning branch 9 times, most recently from 750699c to 25dd3a1 Compare November 14, 2024 21:53
@richard-giraud
Copy link
Author

I need a little help figuring out how to make Codacy happy. I don't believe that I've introduced any new issues, and I'm not sure what needs to be done to address its concerns.

@richard-giraud richard-giraud force-pushed the fix/137-repository-url-warning branch 5 times, most recently from 3e88504 to 422df8b Compare November 15, 2024 06:30
…seable

This adds a skipped test that should be enabled after flxbl-io#137
@richard-giraud
Copy link
Author

It looks like this may be a limitation of how Codacy is configured/works.

I reported a blocking bug at #140

@richard-giraud richard-giraud changed the title fix(sfppackage): improve repository URL error message fix(sfppackage): fix handling of URL-encoded spaces in repository URLs Nov 18, 2024
@richard-giraud
Copy link
Author

richard-giraud commented Nov 18, 2024

I've expanded the patch to include the fix for the issue.

… URL

This updates git-parse-url to version 16.0.0.
@azlam-abdulsalam
Copy link

azlam-abdulsalam commented Nov 26, 2024

@richard-giraud yeah its more of a limitation on codacy, I will have a look, Thanks for the PR

@azlam-abdulsalam azlam-abdulsalam added the bug Something isn't working label Nov 26, 2024
@azlam-abdulsalam azlam-abdulsalam added this to the December 24 milestone Nov 26, 2024
Copy link

@azlam-abdulsalam azlam-abdulsalam left a comment

Choose a reason for hiding this comment

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

okie 👍

@azlam-abdulsalam azlam-abdulsalam merged commit c50cd25 into flxbl-io:main Nov 27, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Install operation fails when repository has URL encoded space
2 participants