Fix and test handling of backslashes in hooks (#3909)

* Update hooks to use `read -r` and `printf`

This portably avoids any interpretation of backslash escapes by the
shell.

* Support running make_tc_task elsewhere

* Add a test for backslashes in task descriptions
This commit is contained in:
Dustin J. Mitchell 2025-07-08 02:40:34 -04:00 committed by GitHub
parent 7fdcdebd19
commit c639cc030d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 115 additions and 75 deletions

View file

@ -6,8 +6,8 @@
# 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.