summaryrefslogtreecommitdiff
path: root/src/rebar_prv_update.erl
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2014-11-10 20:40:56 -0600
committerTristan Sloughter <t@crashfast.com>2014-11-10 20:40:56 -0600
commit6cae428058eb433864538f2e0c4a8fd5dd432f1c (patch)
tree8fb31a81993103476932550bc309ec0f4dbe1bce /src/rebar_prv_update.erl
parent768af3b9060a8234af03e24a7fb31c8bd5d32471 (diff)
use CONFIG_DIR of rebar3 for config directories
Diffstat (limited to 'src/rebar_prv_update.erl')
-rw-r--r--src/rebar_prv_update.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rebar_prv_update.erl b/src/rebar_prv_update.erl
index eb7727b..ce6350b 100644
--- a/src/rebar_prv_update.erl
+++ b/src/rebar_prv_update.erl
@@ -35,8 +35,8 @@ do(State) ->
?INFO("Updating package index...", []),
try
Url = url(State),
- {ok, [[Home]]} = init:get_argument(home),
- PackagesFile = filename:join([Home, ".rebar", "packages"]),
+ Home = rebar_utils:home_dir(),
+ PackagesFile = filename:join([Home, ?CONFIG_DIR, "packages"]),
filelib:ensure_dir(PackagesFile),
{ok, _RequestId} = httpc:request(get, {Url, []}, [], [{stream, PackagesFile}
,{sync, true}])