Update hooks to use read -r and printf

This portably avoids any interpretation of backslash escapes by the
shell.
This commit is contained in:
Dustin J. Mitchell 2025-07-02 15:13:28 -04:00
parent 97058dad79
commit 68cf122cea
No known key found for this signature in database
24 changed files with 50 additions and 49 deletions

View file

@ -6,13 +6,13 @@
# Input:
# - line of JSON for the original task
# - line of JSON for the modified task, the diff being the modification
read original_task
read modified_task
read -r original_task
read -r modified_task
# Output:
# - JSON, modified or unmodified.
# - Optional feedback/error.
echo $original_task
printf "%s\n" "$original_task"
# Status:
# - 0: JSON accepted, non-JSON is feedback.