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>
Alex Riesen committed
Feb 23, 2006 at 12:25 UTC
edd3ebfe27bf0df113846a3d4616ea538f8c04be
1 file changed
+1
-1
git-clone.sh
+1
-1
@@ -118,7 +118,7 @@ dir="$2"
118
[ -e "$dir" ] && echo "$dir already exists." && usage
119
mkdir -p "$dir" &&
120
D=$(cd "$dir" && pwd) &&
121
-trap 'err=$?; rm -r $D; exit $err' exit
121
+trap 'err=$?; cd ..; rm -r "$D"; exit $err' exit
122
case "$bare" in
123
yes) GIT_DIR="$D" ;;
124
*) GIT_DIR="$D/.git" ;;