Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
t/testenv.sh: fix macOS test temp directory name
In commit cc41ca5 we changed the template used for our call to mktemp(1) to add a suffix of "XXXXXX" in order to comply with the requirements of the GNU version of that command, which expects at least 3 "X" characters in a template for a temporary file or directory name. However, on macOS, the BSD version of mktemp(1) treats these as literal "X" characters if the -t option is used, because in this case the following argument is interpreted as a prefix, not a template. Thus we actually create temporary directories on macOS of the form /var/folders/.../git-lfs_TEMP.XXXXXX.<random>, with 8 random characters appended by the command. Since the "X" characters are unnecessary in this case, we adjust our definition of the TEMPDIR_PREFIX variable to leave them off when our tests are running on macOS.
- Loading branch information