fix: remove leading slash on Windows
Status
READY
Description
Removes leading / for file paths on Windows during license checking, by leveraging toFilePath instead of path.
Fixes #1227.
Uri
Before:
Before:
Logs
Before:
After:
Type of Change
- [ ] โจ New feature (non-breaking change which adds functionality)
- [X] ๐ ๏ธ Bug fix (non-breaking change which fixes an issue)
- [ ] โ Breaking change (fix or feature that would cause existing functionality to change)
- [ ] ๐งน Code refactor
- [ ] โ Build configuration change
- [ ] ๐ Documentation
- [ ] ๐๏ธ Chore
Hi @Ascenio!
Thanks for raising the PR. Could you make sure to add some tests to the change?
I think the tests kind of are already there because the only way to test this would be to validate the whole packages check licenses command, for which there are already tests.
Just enabling the tests to run for windows would be enough.
Considering only the licenses command:
Before:
After:
Considering the whole test suite:
Before:
After:
The problem is we can't enable all of them at once or else the pipeline will break. It has to be incremental, by adding @TestOn('vm') for all files at first, and then removing it but also adding testOn: 'vm||windows for each test that was fixed to support both platforms.
Hi @Ascenio thanks for reaching back!
I would like to keep this moving forward, but it might be blocked by us (maintainers) in terms of testing and CI. The CI is currently failing due to what is seems like the synthetic package deprecation. I've made https://github.com/VeryGoodOpenSource/very_good_cli/issues/1246 (let me know if you would like to contribute there too).
This week I will not be able to prioritize the work, but I've scheduled it for next week.