walter-cd / walter

Tiny deployment pipeline
http://walter-cd.net
Apache License 2.0
438 stars 39 forks source link

Using square brackets in only_if #156

Closed csandanov closed 8 years ago

csandanov commented 8 years ago

I'm trying to use following condition only_if: [ "$MY_ENV_VAR" = "value" ] and get

ERROR yaml: line 4: did not find expected alphabetic or numeric character
ERROR failed to create Walter

Works fine with only_if: test "$MY_ENV_VAR" = "value". Is it how walter suppose to work (no square brackets support)?

bkcsoft commented 8 years ago

Try putting the square brackets in quotes, like so only_if: "[ \" $FOO\" == \"bar\" ]"

takahi-i commented 8 years ago

Thank you very much for the valuable comment @csandanov. Thank you so much @bkcsoft for showing us the workaround. I made the patch containing the description on the workaround and the test case in #157.

takahi-i commented 8 years ago

Fixed with #157.