erlef / rebar3_hex

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

Wrong config instructions #199

Open wojtekmach opened 3 years ago

wojtekmach commented 3 years ago

I tried following

http://rebar3.org/docs/package_management/hex_package_management/#config

but it doesn't work:

$ rebar3 hex api_url
===> Command api_url not found in namespace hex

$ rebar3 hex api_url http://localhost:4000
===> Command api_url not found in namespace hex

I'm on:

$ rebar3 version
rebar 3.14.2+build.4911.ref56039119 on Erlang/OTP 24 Erts 11.1.7

$ rebar3 plugins list
--- Global plugins ---
rebar3_hex (6.10.3)
wojtekmach commented 3 years ago

I was able to set the desired configuration by editing the config file:

%% ~/.config/rebar3/rebar.config
{plugins, [{rebar3_hex, {git, "git://github.com/tsloughter/rebar3_hex.git"}}]}.
{hex, [
  {repos, [
    #{
      name => <<"test_repo">>,
      api_key => <<"secret">>,
      api_url => <<"http://localhost:4000">>}]}]}.
paulo-ferraz-oliveira commented 3 years ago

At the same time (@tsloughter, if you prefer I can open different issues), with rebar 3.14.3 on Erlang/OTP 21 Erts 10.3.5.15 + rebar3_hex 6.10.3:

rebar3 hex key -a
===> Uncaught error in rebar_core. Run with DIAGNOSTIC=1 to see stacktrace or consult rebar3.crashdump
starbelly commented 3 years ago

@wojtekmach Yeah, I think I'm going to do a PR to rebar3.org docs and to pull out all that documentation around commands that have yet to be implemented. It's quite confusing. Better to have no docs with a plan to get implemented vs docs out there that suggest "this should work" IMO.

starbelly commented 3 years ago

@paulo-ferraz-oliveira Yes, please open a separate issue so we can keep scope small. It should not crash.

paulo-ferraz-oliveira commented 3 years ago

Will do.