Error: "commands must be a list"

I’m getting this error, don’t know why. Seems the syntax is correct. I read in the guide that this may happen when adding subsection like “pre:” to deployment but I don’t have this. Any idea what’s wrong?

Second, how can I debug this? Is there a more specific error somewhere? I sshed the machine but don’t know where to look. Can I run the build from the machine with a more verbose output? Thanks!

machine:
  xcode:
    version: 8.0

dependencies:
  override:
    - bundle install:
        timeout: 240

deployment:
  beta:
    branch: [circletest]
    commands:
      — bundle exec fastlane beta

One thing which may be related is I executed fastlane beta in home on the remote machine and got some ruby / dependency errors. Can this cause the “commands must be a list” error? I would think it doesn’t, because “commands must be a list” appears to happen when parsing the file, so fastlane beta has not been executed yet.

Another thing which may be related is a “fatal” message in the "start container build phase:

Add containers to ~/.ssh/config as node0
Setting build environment variables
  CIRCLE_ARTIFACTS=/tmp/circle-artifacts.rszXTXR
  CIRCLE_BRANCH=circletest
  CIRCLE_BUILD_IMAGE=osx
  CIRCLE_BUILD_NUM=19
  CIRCLE_BUILD_URL=https://circleci.com/gh/myorg/myapp/19
  CIRCLE_COMPARE_URL=https://github.com/myorg/myapp/compare/1...2
  CIRCLE_NODE_INDEX=0
  CIRCLE_NODE_TOTAL=1
  CIRCLE_PREVIOUS_BUILD_NUM=18
  CIRCLE_PROJECT_REPONAME=myreponame
  CIRCLE_PROJECT_USERNAME=myprojectusername
  CIRCLE_REPOSITORY_URL=https://github.com/myorg/myapp
  CIRCLE_SHA1=123
  CIRCLE_TEST_REPORTS=/tmp/circle-junit.R1UAI35
  CIRCLE_USERNAME=myusername
fatal: No such section!
fatal: No such section!

At the last line, it looks like you’re using an em-dash (—) versus a standard dash (-). The standard dash being the shorter one. Maybe that’s the issue?

2 Likes

Yeah. Was solved in the meantime. That was the problem. I copied this from a blog, some characters were not correct. Thanks!

1 Like