From fc58d12820d6457d768ca6b17e1ff000b53e400d Mon Sep 17 00:00:00 2001 From: Bob Ippolito Date: Tue, 11 May 2010 14:46:20 -0700 Subject: [PATCH] fix hg and git clone commands for when repo does not exactly match application name --- src/rebar_deps.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl index 46d7657..7d07ff4 100644 --- a/src/rebar_deps.erl +++ b/src/rebar_deps.erl @@ -254,11 +254,11 @@ use_source(AppDir, App, VsnRegex, Source, Count) -> download_source(AppDir, {hg, Url, Rev}) -> ok = filelib:ensure_dir(AppDir), - rebar_utils:sh(?FMT("hg clone -U ~s", [Url]), [], filename:dirname(AppDir)), + rebar_utils:sh(?FMT("hg clone -U ~s ~s", [Url, filename:basename(AppDir)]), [], filename:dirname(AppDir)), rebar_utils:sh(?FMT("hg update ~s", [Rev]), [], AppDir); download_source(AppDir, {git, Url, Rev}) -> ok = filelib:ensure_dir(AppDir), - rebar_utils:sh(?FMT("git clone -n ~s", [Url]), [], filename:dirname(AppDir)), + rebar_utils:sh(?FMT("git clone -n ~s ~s", [Url, filename:basename(AppDir)]), [], filename:dirname(AppDir)), rebar_utils:sh(?FMT("git checkout ~s", [Rev]), [], AppDir); download_source(AppDir, {bzr, Url, Rev}) -> ok = filelib:ensure_dir(AppDir),