Bionic build fails: /home/travis/.travis/functions: line 109: cd: too many arguments

/home/travis/.travis/functions: line 109: cd: too many arguments

Job link:

A message like this is often from your own command, the /home/travis/.travis/functions line is merely the internal logic that evals it (you can print that file to double check, of course).

So check closely what exact commands you are running and what arguments they are getting.

See Debugging a script [Bash Hackers Wiki] for tips on debugging Bash logic (in particular, a PS4 value that allows to trace a complex script).

For commands in .travis.yml, converting a command entry into this is often useful:

- |
  set -x
  set +x

In your case, is the prime suspect:

<...> && cd projectM-* && <...>

projectM-* will expand to multiple arguments if multiple entries match it – regardless of whether they are directories or not.