I'm using v0.10.0 of the library on Windows 10
When running commands
pdf-visual-diff approve
pdf-visual-diff discard
they fail to find any snapshot files
After some debugging i think i found the problem. glob expects forward slashes (/), but path uses backslashes (\)
I fixed the issue locally by modifying this line in file lib/cli/utils.js
const pattern = path.join(process.cwd(), startingPath, '**', snapshotsDirName, filenamePatter);
to
const pattern = path.join(process.cwd(), startingPath, '**', snapshotsDirName, filenamePatter).replace(/\\/g, '/');
After this the commands started working correctly and finds snapshot filed
Can this fix be added to the repo to support Windows?
Let me know if you'd like me to submit a PR with this change
I'm using v0.10.0 of the library on Windows 10
When running commands
they fail to find any snapshot files
After some debugging i think i found the problem.
globexpects forward slashes (/), butpathuses backslashes (\)I fixed the issue locally by modifying this line in file
lib/cli/utils.jsto
After this the commands started working correctly and finds snapshot filed
Can this fix be added to the repo to support Windows?
Let me know if you'd like me to submit a PR with this change