-
-
Notifications
You must be signed in to change notification settings - Fork 763
Closed
Labels
dep: mvdan/shIssues related to the upstream interpreter used by Task.Issues related to the upstream interpreter used by Task.
Description
- Task version: v3.35.1
- Operating system: Ubuntu 20.04
- Experiments enabled: none
Basic shell command works exactly the same in sh, bash and zsh (i.e producing the exact same output as input)
$ cat << EOF
{
"key1": "a simple text with an escaped doublequote \" in the text"
}
EOF
{
"key1": "a simple text with an escaped doublequote \" in the text"
}but the following task prints different outputs:
version: '3'
tasks:
test:
vars:
TEXT: |
{
"key1": "a simple text with an escaped doublequote \" in the text"
}
cmds:
- echo '{{.TEXT}}'
- |
cat << EOF
{{.TEXT}}
EOFOutput: (do note the last entry not having an escaped doublequote)
$ task test
task: [test] echo '{
"key1": "a simple text with an escaped doublequote \" in the text"
}
'
{
"key1": "a simple text with an escaped doublequote \" in the text"
}
task: [test] cat << EOF
{
"key1": "a simple text with an escaped doublequote \" in the text"
}
EOF
{
"key1": "a simple text with an escaped doublequote " in the text"
}
I see this as 1 bug and 1 feature-request:
feature suggestion: apart of settings your command using the "sh:" key, add a "stdin" or "input" key to be a variable
cmds:
- sh: cat
stdin: TEXTMetadata
Metadata
Assignees
Labels
dep: mvdan/shIssues related to the upstream interpreter used by Task.Issues related to the upstream interpreter used by Task.