You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Frank Carey edited this page Dec 1, 2015
·
1 revision
This actually works as-is using the yaml | pipe syntax..
...
commands:
my-multiline-command:
cmd: | echo "1 - If this passes" && echo "2 - Then do this" || echo "3 - Or do this if 1 or 2 fails (returns non-zero)"
You can even write full scripts:
...
commands:
confirm:
cmd: | read -r -p "{{args}} [y/N] " response if [ $response = y ] thentrue elsefalse fi
If you want to do multiple lines that append together (a really long string perhaps), you can use the Yaml - dash character.
...
commands:
echo-long-string:
cmd: -echo "This is a really reallyreally really long string"