Skip to content

Commit 3dd4ec5

Browse files
authored
Add XXXX to a mktemp template pattern. (#235)
Linux mktemp wants at least three X characters in the template.
1 parent d7f4303 commit 3dd4ec5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

git_hooks/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jar_base_dir="git_hooks/"
2424
# https://github.com/pre-commit/pre-commit/blob/master/pre_commit/staged_files_only.py#L15
2525
# Basically we just diff the unstaged changes, store the patch, and apply it later.
2626
# In the future, we should consider migrating to using that library.
27-
staged_changes_diff=$(mktemp -t format_patch)
27+
staged_changes_diff=$(mktemp -t format_patch_XXXX)
2828
git diff --ignore-submodules --binary --exit-code --no-color > $staged_changes_diff
2929
if [ $? -eq 1 ]; then
3030
echo "Found unstaged changes, storing in ${staged_changes_diff}"

0 commit comments

Comments
 (0)