Skip to content

Commit

Permalink
Fix usage of mktemp
Browse files Browse the repository at this point in the history
  • Loading branch information
udhos committed Oct 24, 2016
1 parent 8fed573 commit abbdbcc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion git-redate
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ esac
shift
done

tmpfile=$(mktemp gitblah)
die () {
echo `basename $0`: >&2 $*
exit 1
}

tmpfile=$(mktemp gitblah-XXXX)
[ -f "$tmpfile" ] || die "could not get tmpfile=[$tmpfile]"
trap "rm -f $tmpfile" EXIT

if [ -n "${COMMITS+set}" ];
Expand Down

0 comments on commit abbdbcc

Please sign in to comment.