Circle CI v2 failing with "cannot unmarshal string"



Trying out v2 and I’m getting the following error message with a fairly vanilla build script:

cannot unmarshal string into Go value of type config.JobDescription

Here is the configuration file:

version: 2

  working_directory: ~/prtty
      - image: gcc@4.9.4
      - checkout
      - run: mkdir build
      - run:
          name: Configure with CMake
          command: cmake ..
          working_directory: ~/prtty/build
      - run:
          name: Build
          command: cmake --build .
          working_directory: ~/prtty/build
      - run:
          name: Test example
          command: ./build/prtty_tests ./test

Is there something I should be adding?


Your working_directory directive is on the wrong level. It should be nested under build.


Any way to get a better error message on that? I wouldn’t have figured that out for a while I don’t think.

EDIT: Also, thank you :slight_smile: That fixed it.


Hopefully :smiley:


This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.