-
Notifications
You must be signed in to change notification settings - Fork 222
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: skip unneeded url parse and only add git+ when needed #3139
base: main
Are you sure you want to change the base?
Conversation
@@ -239,7 +239,7 @@ async fn add_functionality_os() { | |||
|
|||
/// Test the `pixi add --pypi` functionality | |||
#[tokio::test(flavor = "multi_thread", worker_threads = 1)] | |||
#[cfg_attr(not(feature = "slow_integration_tests"), ignore)] | |||
// #[cfg_attr(not(feature = "slow_integration_tests"), ignore)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to comment it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oowps nope, did that for testing locally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let url_str = git.to_string(); | ||
let stripped = url_str.strip_prefix("git+").unwrap_or(&url_str); | ||
// Reparse the url with the new scheme, should be safe but could fail so fall back to the original. | ||
Url::parse(stripped).unwrap_or(git.clone()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this not be an actual error? When would it be okay if this fails?
The second time parsing the git URL would remove the
git@
fromssh://git@github..
which is not right in this case.TODO: