Persistence issue with CircleCI

We have had an orb that exists for a long time; we decided to use the same orb in a new project.

The part below stopped working for no reason

  • persist_to_workspace:
    - .
    root: .

The error we get is
The specified paths did not match any files in /home/circleci/project

How can we debug it? It looks so wrong, especially previously it worked.

I would bet that one of the following things is going on:

  1. You’re not calling checkout before this step, thus /home/circleci/project is empty.
  2. You’re calling checkout but it’s a new git repo and so the directory is empty somehow (this feels less likely).

To debug it I would probably explode the orb into your project, get it to run up to the persist to workspace step, and then either ssh in and see what there is to see or simply add a run: ls -lA or similar.

Hope that helps!

@timvisher It came out that in the config.yml, I had a weird new line sign, so I persisted not into . (dot folder) but into (dot plus newline char) folder. The second naturally didn’t exist.

1 Like