Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop coercing Pipfile source url's to have trailing slashes (#7783)
I had to stare at this code golf for a little bit to realize that it's enforcing that every source URL in a `Pipfile` has one-and-only-one trailing slash. I started to tweak it a little to make it more readable, but I decided instead that this is business we really shouldn't be in... Dependabot is the tool that runs the package manager, not the package manager itself. So if a package manager doesn't like a URL that lacks a trailing slash, it should be the one handling the coercing or raising the error, and then we transparently forward that to the user. In fact the opposite would be worse! If the native package manager (in this case `pipenv`) is failing for a URL, but works because we silently munge it then that'd lead to confusing/difficult to debug scenario. There are some use cases where we need to handle URL normalization for deduping purposes within Dependabot internals, but I poked around a bit and as far as I can tell they don't apply here. So let's trust the user / package managers to do the right thing (which may mean giving us a clear error).
- Loading branch information