Cd command not working in bash

I need some basic if else logic and decided to do it in bash.

But seems all cd commands don’t work.

I get the error: 18: cd: can't cd to ~/xx/yyy/zzzz
Buildfile: build.xml does not exist!
Build failed

the same script works locally.

Pro-tip: if your code doesn’t work, then show that code (or a relevant part of it).

There are two reasons I can think of (and do show your code):

  1. ~/xx/yyy/zzzz doesn’t exist (You probably need to mkdir it)
  2. It exists, but some element of the path is not readable by the user running circleci tests

Use the circleci ssh feature to log and experiment, running your

Oh, and use “set -x” in your so you can see what was going on.

And as the other commentor said… Include a bit of the code if you’re going to ask for help.

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