Skip to main content

How to solve the escaping character error

Overview

Sometimes you may see the error like below:

Error: Error calling command: 'status'
Unclosed '<<' tag
('<<' must be escaped as '\<<' in config v2.1+)
# Parse the filter (we don't need << here)
                                  ^^
Exited with code exit status 255

Solution

This occurs because there are unescaped characters << in your configuration file. These characters should be escaped by \(backslash) as described in the error message. The sample configuration file looks like this:

- run:
    name: step1
    command: |
      # Parse the filter (we don't need \<< here)
      pwd
      ls -al
Did this answer your question?