bun icon indicating copy to clipboard operation
bun copied to clipboard

fix(which/windows): ignore file extension case

Open SunsetTechuila opened this issue 10 months ago • 2 comments

What does this PR do?

This fixes #10101

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

How did you verify your code works?

I compiled the executable and tested it manually

SunsetTechuila avatar Apr 09 '24 02:04 SunsetTechuila

Ok, I will

SunsetTechuila avatar Apr 09 '24 08:04 SunsetTechuila

@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

SunsetTechuila avatar Apr 09 '24 11:04 SunsetTechuila

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)

gvilums avatar Apr 11 '24 20:04 gvilums

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

SunsetTechuila avatar Apr 11 '24 22:04 SunsetTechuila

@gvilums done

SunsetTechuila avatar Apr 11 '24 22:04 SunsetTechuila

Thank you

Jarred-Sumner avatar Apr 15 '24 12:04 Jarred-Sumner