Parentheses in commands
I understood I should escape () parentheses, but how do I do it? Backslashes did not work, task says:
task: Failed to parse Taskfile.yml: yaml: line 16: found unknown escape character
7 Replies
@ibragdzh Can you paste that part of your Taskfile? It an YAML parse error, so it looks like simply wrapping your command into quotes would work.
Sure, here it is:
I'm migrating from Makefile and this command was working as expected with make, but I don't yet know how do I adapt it to Taskfile
just mentioning, the answer is message below
@ibragdzh This page has some explanation on how to declare multi-line string in YAML: https://yaml-multiline.info/ Using
|
is probably what you want.YAML Multiline Strings
Find the right syntax for your YAML multiline strings.
Thanks. Updated this multiline var, now returned to the another error saying no parentheses:
Trying both escaped and non-escaped parentheses didn't work for me
Try to change
echo \"{{.MIGRATION_FILE}}\" > $$FILENAME;
to echo {{shellQuote .MIGRATION_FILE}} > $$FILENAME;
Unfortunately,
Looks like there's a leading
$
in front of that string. I think it shouldn't be there.