lost-pixel / lost-pixel

Open source alternative to Percy, Chromatic, Applitools.

Home Page:https://lost-pixel.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Path to lostpixel.config.ts contains working dir twice

trebconnell opened this issue · comments

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

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

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.

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

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