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(which/windows): ignore file extension case #10102

Merged
merged 10 commits into from
Apr 15, 2024
Merged

fix(which/windows): ignore file extension case #10102

merged 10 commits into from
Apr 15, 2024

Conversation

SunsetTechuila
Copy link
Contributor

What does this PR do?

This fixes #10101

  • Documentation or TypeScript types (it's okay to leave the rest blank in this case)
  • Code changes

How did you verify your code works?

I compiled the executable and tested it manually

Copy link
Member

@paperclover paperclover left a comment

Choose a reason for hiding this comment

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

can you add a unit test to verify this works?

@SunsetTechuila
Copy link
Contributor Author

Ok, I will

@SunsetTechuila
Copy link
Contributor Author

SunsetTechuila commented Apr 9, 2024

@paperdave done
but I have no idea how to run this test
don't think this can be done with js/ts test since this is a windows-specific function

@gvilums
Copy link
Contributor

gvilums commented Apr 11, 2024

We don't currently run zig tests in our test suite. Instead, I suggest adding something like the following to which.test.ts:

test.if(isWindows)("which is case-insensitive", () => {
  expect(which("cmd.EXE")).toBe("C:\\Windows\\system32\\cmd.exe");
})

(feel free to adjust)

@SunsetTechuila
Copy link
Contributor Author

oh, so you have os-specific js/ts tests, i see now

@SunsetTechuila
Copy link
Contributor Author

@gvilums done

@Jarred-Sumner
Copy link
Collaborator

Thank you

@Jarred-Sumner Jarred-Sumner merged commit 233624b into oven-sh:main Apr 15, 2024
27 of 32 checks passed
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.

Bun is case-sensetive to file extensions on Windows
4 participants