Kachi
Kachi

Reputation: 21

CircleCI error ('<<' must be escaped as '\\<<' in config v2.1+)

- build-deploy-dev:
          context: dev-team
          requires:
            - test_app
                <<:*onlyMain\<<

I've used "\\<<" as well but still get the same error.

Upvotes: 2

Views: 1062

Answers (2)

markfickett
markfickett

Reputation: 773

A single backslash worked for me, but I got thrown off because << in comments also has to be escaped. So in the end it looked like:

command: |
  # we need to escape \<< even in comments
  cat \<<END_HEREDOC
    my heredoc
  END_HEREDOC

Upvotes: 1

dspeyer
dspeyer

Reputation: 3036

Try using just one backslash. The error message may be getting escaped somewhere.

Upvotes: 1

Related Questions