Description
I just migrated a pre-push git hook to Taskfile.
➤ cat .git/hooks/pre-push
#!/bin/sh
set -e
task test-all
This fails with a mysterious
➤ git push
task: Failed to parse __stdin__:
yaml: line 1: cannot unmarshal !!str into taskfile
error: failed to push some refs to 'github.com:gregtatum/indie-web.git'
Running the following works:
I realized that the hook was piping stdin in to the command. I worked around it with:
➤ cat .git/hooks/pre-push
#!/bin/sh
set -e
cat > /dev/null | task test-all
However, it would be nice to not have a cryptic error when stdin is being written to.
Version
Task version: v3.35.1 (h1:zjQ3tLv+LIStDDTzOQx8F97NE/8FSTanjZuwgy/hwro=)
Operating system
macOS
Experiments Enabled
No response
Example Taskfile