summaryrefslogtreecommitdiff
path: root/src/rebar_agent.erl
diff options
context:
space:
mode:
authorViacheslav Kovalev <kovyl2404@gmail.com>2015-06-03 13:08:46 +0300
committerDaniel Widgren <daniel.widgren@gmail.com>2015-06-26 09:20:28 +0200
commitf7bd6ca8ac7a125fbaf21100e6a7fd4e6511fd0c (patch)
tree9c1e69ad4f540f36bdadb9736743eb1723a7a286 /src/rebar_agent.erl
parente3d32b10cc074f3f76973ffad7038b8786b9b951 (diff)
Fix common test run duplication on windows
Diffstat (limited to 'src/rebar_agent.erl')
-rw-r--r--src/rebar_agent.erl6
1 files changed, 3 insertions, 3 deletions
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)),