summaryrefslogtreecommitdiff
path: root/src/rebar_state.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_state.erl')
-rw-r--r--src/rebar_state.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rebar_state.erl b/src/rebar_state.erl
index 4b2d872..8b793a2 100644
--- a/src/rebar_state.erl
+++ b/src/rebar_state.erl
@@ -54,7 +54,12 @@ new(Config) when is_list(Config) ->
#state_t { dir = rebar_utils:get_cwd(),
opts = dict:from_list(Config) }.
--spec new(t(), list()) -> t().
+-spec new(t() | atom(), list()) -> t().
+new(Profile, Config) when is_atom(Profile)
+ , is_list(Config) ->
+ #state_t { dir = rebar_utils:get_cwd(),
+ current_profile = Profile,
+ opts = dict:from_list(Config) };
new(ParentState=#state_t{}, Config) ->
%% Load terms from rebar.config, if it exists
Dir = rebar_utils:get_cwd(),