commit(s) to merge: sdk/+/221626 adds the following commit dart-lang/pub@b9edfa5 to pub (on-top of the previous cherry-pick).
merge instructions: Should merge clean.
What is the issue: Running dart pub publish with a custom pub package server that has a URL containing a path will not work.
What is the fix: Instead of uri.resolve('/api/versions/new') we do uri.resolve('api/versions/new'). Such that PUB_HOSTED_URL=https://pub.example.com/user becomes https://pub.example.com/user/api/versions/new.
Note, we've already normalized PUB_HOSTED_URL and publish_to URLs to always end in slash, if path is non-empty, see validateAndNormalizeHostedUrl.
Why cherrypick: Efforts of cloudsmith to finish support for publishing from pub command line is blocked this, as they have organization and repository embedded in the URL.
Risk: Small, the official pub repository URL doesn't have path segments so the change has no effect there.
/cc @mit-mit @whesse @athomas @vsmenon @devoncarew
commit(s) to merge: sdk/+/221626 adds the following commit dart-lang/pub@b9edfa5 to pub (on-top of the previous cherry-pick).
merge instructions: Should merge clean.
What is the issue: Running
dart pub publishwith a custom pub package server that has a URL containing a path will not work.What is the fix: Instead of
uri.resolve('/api/versions/new')we douri.resolve('api/versions/new'). Such thatPUB_HOSTED_URL=https://pub.example.com/userbecomeshttps://pub.example.com/user/api/versions/new.Note, we've already normalized
PUB_HOSTED_URLandpublish_toURLs to always end in slash, if path is non-empty, seevalidateAndNormalizeHostedUrl.Why cherrypick: Efforts of cloudsmith to finish support for publishing from pub command line is blocked this, as they have organization and repository embedded in the URL.
Risk: Small, the official pub repository URL doesn't have path segments so the change has no effect there.
/cc @mit-mit @whesse @athomas @vsmenon @devoncarew