From: Alex Riesen Date: Thu, 23 Feb 2006 11:25:20 +0000 (+0100) Subject: fix t5600-clone-fail-cleanup.sh on windows X-Git-Tag: v1.2.4~9^4 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=edd3ebfe27bf0df113846a3d4616ea538f8c04be;p=git.git 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 --- diff --git a/git-clone.sh b/git-clone.sh index d184ceb7..be471d82 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" ;;