Fix #1443 macOS: regression_test.sh: mktemp: illegal option (#1444)
The macOS version of mktemp does not recognize the --suffix option.
Using pure -d should work since, it seems [1], macOS 10.11 however.
So to make the script work on macOS, stop using the --suffix option.
The downside is of course that the temporary dir will have an anonymous
name, but I see no risk of confusion given how short-lived the usage of
the dir is, and given the context it is used.
[1] https://unix.stackexchange.com/questions/30091/fix-or-alternative-for-mktemp-in-os-x
commit60e00d49a99f33eb90397c6932c770d82fd481ec
authorMartin Nordholts <enselic@gmail.com>
dateMon 21 Dec 2020, 08:16 (6 years ago)
parent2d22c70
CHANGELOG.md+1
@@ -6,6 +6,7 @@
66## Bugfixes
77
88- only print themes hint in interactive mode (`bat --list-themes`), see #1439 (@rsteube)
9+- Make ./tests/syntax-tests/regression_test.sh work on recent versions of macOS, see #1443 (@Enselic)
910
1011## Other
1112
tests/syntax-tests/regression_test.sh+1−1
@@ -4,7 +4,7 @@ set -eou pipefail
44
55script_directory="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
66
7−output_directory=$(mktemp -d --suffix=.bat-syntax-regression-test)
7+output_directory=$(mktemp -d)
88
99"$script_directory"/create_highlighted_versions.py --output="$output_directory"
1010