hexpm / hex

Package manager for the Erlang ecosystem.
https://hex.pm
961 stars 184 forks source link

Improved Error Message (Issue #949) #1001

Closed Coreastreet closed 3 months ago

Coreastreet commented 1 year ago

Hi hex maintainers,

This pull request is intended to added Issue #949 for hexpm/hex.

Basically, my changes to hex.publish under tasks directory make a call to hexpm's API to check whether a package with the same name exists and if so, create another matching condition which returns a more informative error in the format: "Package with the name 'foobar' has already exists".

I have successfully tested the code with two identical packages with the only difference being the package name (jason vs new_jason)

However, I have not tested the code with packages publishing under an organization or repository. In which case, the code may simply return the standard error I think.

Regards, Coreastreet (new to elixir)

Coreastreet commented 10 months ago

Hi supersimple (username),

I will commit the changes once ericmj reviews your changes.

Regards, Justin

ericmj commented 3 months ago

Getting this PR over the finish line here: https://github.com/hexpm/hex/pull/1021, unfortunately I couldn't push to the PR branch. Sorry for the delay.

Thanks @Coreastreet and @supersimple!