Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove leading slash on Windows #1230

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Ascenio
Copy link

@Ascenio Ascenio commented Jan 18, 2025

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)
  • 🛠️ 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 Ascenio requested a review from a team as a code owner January 18, 2025 23:28
Copy link
Contributor

@alestiago alestiago left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Ascenio!

Thanks for raising the PR. Could you make sure to add some tests to the change?

@Ascenio
Copy link
Author

Ascenio commented Jan 22, 2025

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
Copy link
Author

Ascenio commented Jan 22, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trouble with CLI License Checker
2 participants