From 5e58823fd67703d7bfeb0b6f4848d9af2c292b9a Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Wed, 18 Mar 2015 19:11:49 -0500 Subject: treat _checkouts as deps that are always compiled --- src/rebar_dir.erl | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/rebar_dir.erl') diff --git a/src/rebar_dir.erl b/src/rebar_dir.erl index 628ebd3..4a9bf09 100644 --- a/src/rebar_dir.erl +++ b/src/rebar_dir.erl @@ -3,6 +3,8 @@ -export([base_dir/1, deps_dir/1, deps_dir/2, + checkouts_dir/1, + checkouts_dir/2, plugins_dir/1, lib_dirs/1, home_dir/0, @@ -40,6 +42,17 @@ deps_dir(State) -> deps_dir(DepsDir, App) -> filename:join(DepsDir, App). +root_dir(State) -> + rebar_state:get(State, root_dir, ?DEFAULT_ROOT_DIR). + +-spec checkouts_dir(rebar_state:t()) -> file:filename_all(). +checkouts_dir(State) -> + filename:join(root_dir(State), rebar_state:get(State, checkouts_dir, ?DEFAULT_CHECKOUTS_DIR)). + +-spec checkouts_dir(rebar_state:t(), file:filename_all()) -> file:filename_all(). +checkouts_dir(State, App) -> + filename:join(checkouts_dir(State), App). + -spec plugins_dir(rebar_state:t()) -> file:filename_all(). plugins_dir(State) -> case lists:member(global, rebar_state:current_profiles(State)) of -- cgit v1.1