pest icon indicating copy to clipboard operation
pest copied to clipboard

[Bug]: Misleading coverage error with read-only vendor

Open alpha0010 opened this issue 1 year ago • 0 comments

What Happened

When the vendor directory is not writable by the user executing pest, coverage fails to generate with the confusing message:

WARN Unable to get coverage using Xdebug. Did you set Xdebug's coverage mode?

In my case, Xdebug was correctly configured, just vendor/pestphp/pest/.temp was not writable. So I spent a lot of time looking in the wrong location for the issue.

How to Reproduce

sudo chown -R root.root vendor
vendor/bin/pest --coverage

Sample Repository

No response

Pest Version

2.34.7

PHP Version

8.1.14

Operation System

Linux

Notes

I was executing tests within a docker container.

alpha0010 avatar May 10 '24 19:05 alpha0010