summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuhani Rankimies <juhani@juranki.com>2010-08-04 11:07:37 +0300
committerJuhani Rankimies <juhani@juranki.com>2010-08-04 11:07:37 +0300
commitde716e18524355ad406fba34f99be07f5206dbbd (patch)
tree61ce024a262981b4917120bb13f8a0bb25cf65b6
parent5d789283294cf247d58549019d2caf909ca4cdf4 (diff)
fix get-deps on win32
-rw-r--r--src/rebar_deps.erl8
-rw-r--r--src/rebar_utils.erl6
2 files changed, 9 insertions, 5 deletions
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index 5d6a890..8f1626a 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -314,12 +314,12 @@ required_scm_client_vsn(bzr) -> {2, 0};
required_scm_client_vsn(svn) -> {1, 6}.
scm_client_vsn(hg) ->
- scm_client_vsn(os:find_executable(hg), " --version", "version (\\d+).(\\d+)");
+ scm_client_vsn(rebar_utils:find_executable(hg), " --version", "version (\\d+).(\\d+)");
scm_client_vsn(git) ->
- scm_client_vsn(os:find_executable(git), " --version", "git version (\\d+).(\\d+)");
+ scm_client_vsn(rebar_utils:find_executable(git), " --version", "git version (\\d+).(\\d+)");
scm_client_vsn(bzr) ->
- scm_client_vsn(os:find_executable(bzr), " --version", "Bazaar \\(bzr\\) (\\d+).(\\d+)");
+ scm_client_vsn(rebar_utils:find_executable(bzr), " --version", "Bazaar \\(bzr\\) (\\d+).(\\d+)");
scm_client_vsn(svn) ->
- scm_client_vsn(os:find_executable(svn), " --version", "svn, version (\\d+).(\\d+)");
+ scm_client_vsn(rebar_utils:find_executable(svn), " --version", "svn, version (\\d+).(\\d+)");
scm_client_vsn(_) ->
undefined.
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
index 1aecd2e..95981a3 100644
--- a/src/rebar_utils.erl
+++ b/src/rebar_utils.erl
@@ -38,7 +38,8 @@
beam_to_mod/2, beams/1,
erl_to_mod/1,
abort/2,
- escript_foldl/3]).
+ escript_foldl/3,
+ find_executable/1]).
-include("rebar.hrl").
@@ -125,6 +126,9 @@ escript_foldl(Fun, Acc, File) ->
escript:foldl(Fun, Acc, File)
end.
+find_executable(Name) ->
+ "\"" ++ filename:nativename(os:find_executable(Name)) ++ "\"".
+
%% ====================================================================
%% Internal functions
%% ====================================================================