From f7bd6ca8ac7a125fbaf21100e6a7fd4e6511fd0c Mon Sep 17 00:00:00 2001 From: Viacheslav Kovalev Date: Wed, 3 Jun 2015 13:08:46 +0300 Subject: Fix common test run duplication on windows --- src/rebar_agent.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/rebar_agent.erl') diff --git a/src/rebar_agent.erl b/src/rebar_agent.erl index 0432fb8..674e002 100644 --- a/src/rebar_agent.erl +++ b/src/rebar_agent.erl @@ -20,7 +20,7 @@ do(Namespace, Command) when is_atom(Namespace), is_atom(Command) -> gen_server:call(?MODULE, {cmd, Namespace, Command}, infinity). init(State) -> - {ok, Cwd} = file:get_cwd(), + Cwd = rebar_dir:get_cwd(), {ok, #state{state=State, cwd=Cwd}}. handle_call({cmd, Command}, _From, State=#state{state=RState, cwd=Cwd}) -> @@ -48,8 +48,8 @@ terminate(_Reason, _State) -> run(Namespace, Command, RState, Cwd) -> try - case file:get_cwd() of - {ok, Cwd} -> + case rebar_dir:get_cwd() of + Cwd -> Args = [atom_to_list(Namespace), atom_to_list(Command)], CmdState0 = refresh_state(RState, Cwd), CmdState1 = rebar_state:set(CmdState0, task, atom_to_list(Command)), -- cgit v1.1