aboutsummaryrefslogtreecommitdiff
path: root/git-clone.sh
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2006-02-23 12:25:20 +0100
committerJunio C Hamano <junkio@cox.net>2006-02-23 03:47:15 -0800
commitedd3ebfe27bf0df113846a3d4616ea538f8c04be (patch)
treed941b6d47e71ab4a9444f32e40fb58909d4da9e1 /git-clone.sh
parent6dc78e696b8597204b903073da932fc5ed0f419e (diff)
downloadgit-edd3ebfe27bf0df113846a3d4616ea538f8c04be.tar.gz
git-edd3ebfe27bf0df113846a3d4616ea538f8c04be.tar.xz
fix t5600-clone-fail-cleanup.sh on windows
In windows you cannot remove current or opened directory, an opened file, a running program, a loaded library, etc... [jc: signoffs? With a minor quoting fix.] Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-clone.sh')
-rwxr-xr-xgit-clone.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-clone.sh b/git-clone.sh
index d184ceb7a..be471d82b 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -118,7 +118,7 @@ dir="$2"
[ -e "$dir" ] && echo "$dir already exists." && usage
mkdir -p "$dir" &&
D=$(cd "$dir" && pwd) &&
-trap 'err=$?; rm -r $D; exit $err' exit
+trap 'err=$?; cd ..; rm -r "$D"; exit $err' exit
case "$bare" in
yes) GIT_DIR="$D" ;;
*) GIT_DIR="$D/.git" ;;