Closed zilinc closed 7 years ago
It is not valid YAML; you can't have the octothorp in an implicit multi-line string.
You might mean something like:
- |
if diff -u $HOME/.cabsnap/installplan.txt installplan.txt;
then
echo "cabal build-cache HIT";
# OFFENDING COMMENT
else
echo "cabal build-cache MISS";
fi
Thanks for the clarification.
A little more clarification. If the octothorp is the last line, for example, it is fine.
This is valid YAML (but the resulting string is not valid bash).
- if diff -u $HOME/.cabsnap/installplan.txt installplan.txt;
then
echo "cabal build-cache HIT";
# OFFENDING COMMENT
The octothorp introduces a comment, which is a new token in YAML, so the line above it terminates the string.
The YAML parse at this point is waiting for a next item in the sequence introduced by - if …
, or the end of the sequence, but what follows the #
line is:
else
⋮
which is a scalar.
If the offending comment near the bottom is removed, then it validates.