fix get-deps on win32

This commit is contained in:
Juhani Rankimies 2010-08-04 11:07:37 +03:00
parent 5d78928329
commit de716e1852
2 changed files with 9 additions and 5 deletions

View file

@ -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.

View file

@ -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
%% ====================================================================