erlef / rebar3_hex

Rebar3 Hex library
Apache License 2.0
101 stars 49 forks source link

Improve error message when user is not authenticated. #5

Closed carlosedp closed 9 years ago

carlosedp commented 9 years ago

Plugin should warn that user is not authenticated to hex.pm when trying to publish package:

~/projects/rebar3_diameter_compiler
☺  ./rebar3 hex publish                                          master@ee4afae
===> Load global config file /Users/carlosedp/.config/rebar3/rebar.config
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace
===> Uncaught error: {badmatch,error}
===> Stack trace to the error location: [{rebar3_hex_pkg,publish,6,
                                                 [{file,
                                                   "/Users/carlosedp/.cache/rebar3/plugins/rebar3_hex/src/rebar3_hex_pkg.erl"},
                                                  {line,114}]},
                                                {rebar3_hex_pkg,publish,2,
                                                 [{file,
                                                   "/Users/carlosedp/.cache/rebar3/plugins/rebar3_hex/src/rebar3_hex_pkg.erl"},
                                                  {line,84}]},
                                                {lists,foldl,3,
                                                 [{file,"lists.erl"},
                                                  {line,1261}]},
                                                {rebar_core,do,2,
                                                 [{file,
                                                   "/home/travis/build/rebar/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
                                                  {line,124}]},
                                                {rebar_prv_do,do_tasks,2,
                                                 [{file,
                                                   "/home/travis/build/rebar/rebar3/_build/default/lib/rebar/src/rebar_prv_do.erl"},
                                                  {line,68}]},
                                                {rebar_core,do,2,
                                                 [{file,
                                                   "/home/travis/build/rebar/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
                                                  {line,124}]},
                                                {rebar3,main,1,
                                                 [{file,
                                                   "/home/travis/build/rebar/rebar3/_build/default/lib/rebar/src/rebar3.erl"},
                                                  {line,47}]},
                                                {escript,run,2,
                                                 [{file,"escript.erl"},
                                                  {line,752}]}]
===> When submitting a bug report, please include the output of `rebar3 report "your command"`

Also would be great to add the command options documentation from readme to the plugin itself (when ran ./rebar3 hex).

tsloughter commented 9 years ago

Thanks, fixed in v1.6.3