summaryrefslogtreecommitdiffstats
path: root/testing/resources/arbitrary_bytes_repo/hook.sh
diff options
context:
space:
mode:
Diffstat (limited to 'testing/resources/arbitrary_bytes_repo/hook.sh')
-rwxr-xr-xtesting/resources/arbitrary_bytes_repo/hook.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/testing/resources/arbitrary_bytes_repo/hook.sh b/testing/resources/arbitrary_bytes_repo/hook.sh
new file mode 100755
index 0000000..9df0c5a
--- /dev/null
+++ b/testing/resources/arbitrary_bytes_repo/hook.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+# Intentionally write mixed encoding to the output. This should not crash
+# pre-commit and should write bytes to the output.
+# '☃'.encode() + '²'.encode('latin1')
+echo -e '\xe2\x98\x83\xb2'
+# exit 1 to trigger printing
+exit 1