Skip to content

Commit

Permalink
Problem: 'trap...exit' causes error message when /bin/sh is ash.
Browse files Browse the repository at this point in the history
Problem: 'trap...exit' causes error message when /bin/sh is ash.
Fix: Change 'trap...exit' to 'trap...0' like in other scripts.

Signed-off-by: Yakov Lerner <iler.ml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Yakov Lerner authored and Junio C Hamano committed May 23, 2006
1 parent e300846 commit f803eec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ dir="$2"
[ -e "$dir" ] && echo "$dir already exists." && usage
mkdir -p "$dir" &&
D=$(cd "$dir" && pwd) &&
trap 'err=$?; cd ..; rm -r "$D"; exit $err' exit
trap 'err=$?; cd ..; rm -r "$D"; exit $err' 0
case "$bare" in
yes) GIT_DIR="$D" ;;
*) GIT_DIR="$D/.git" ;;
Expand Down Expand Up @@ -407,5 +407,5 @@ Pull: refs/heads/$head_points_at:$origin_track" &&
fi
rm -f "$GIT_DIR/CLONE_HEAD" "$GIT_DIR/REMOTE_HEAD"

trap - exit
trap - 0

0 comments on commit f803eec

Please sign in to comment.