very_good_cli icon indicating copy to clipboard operation
very_good_cli copied to clipboard

fix: remove leading slash on Windows

Open Ascenio opened this issue 11 months ago โ€ข 3 comments

Status

READY

Description

Removes leading / for file paths on Windows during license checking, by leveraging toFilePath instead of path.

Fixes #1227.

Uri Before: before Before: after

Logs Before: before-log After: after-log

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

Ascenio avatar Jan 18 '25 23:01 Ascenio

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: image After: image

Considering the whole test suite: Before: image After: image

Ascenio avatar Jan 22 '25 00:01 Ascenio

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.

Ascenio avatar Jan 22 '25 01:01 Ascenio

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.

alestiago avatar Feb 24 '25 12:02 alestiago