lost-pixel / lost-pixel

Open source alternative to Percy, Chromatic, Applitools.
https://lost-pixel.com/
MIT License
1.31k stars 41 forks source link

Path to lostpixel.config.ts contains working dir twice #208

Closed trebconnell closed 1 year ago

trebconnell commented 1 year ago

Bug description

I just installed lost-pixel into my Storybook+Vite project, created config, and tried to run update. Got this result:

E:\devl\app>npx lost-pixel update
Version: 2.22.1
Loading project configuration...
Current working directory: E:\devl\app
Looking for configuration file: E:\devl\app\E:\devl\app\lostpixel.config.(js|ts)
Couldn't find project config file 'lostpixel.config.(js|ts)'

It's looking for the config in: E:\devl\app\E:\devl\app\lostpixel.config.(js|ts) which isn't correct.

This may be a Windows issue?

How to reproduce

Expected behavior

The path to the config is correct and it's able to load.

Lost Pixel information

lost-pixel logs from CI

No response

trebconnell commented 1 year ago

I binary searched for the release that caused this and found the commit, it's ed8674220fb9bbed4198a5010b88f4feb67e078e.

On Windows checking for the '/' to see if it's absolute doesn't work. Switching to use isAbsolute does. I'll put together a PR.

d-ivashchuk commented 1 year ago

Thanks again @trebconnell! Replied in the PR itself, let's get this working 🚀

chriskalmar commented 1 year ago

Released in v2.22.2 Will close this now. Feel free to re-open it in case it doesn't work.