Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Added support for windows where.exe #21

Closed
wants to merge 1 commit into from
Closed

Added support for windows where.exe #21

wants to merge 1 commit into from

Conversation

YourWishes
Copy link

As mentioned in #5 , Windows does not support the which command, instead using a where.exe command to replace it. I've added a new promise chain that will attempt to resolve both (which should also support WSL systems).

where.exe resolves to a series of commands where each command is on a separate line, so I've split the lines by their newline separator, trimmed the white space to remove windows systems return carriage characters before finding the first valid entry.

At the moment, for me specifically, this will result in the executable being returned before the .bat file, which is sufficient.

This does not resolve #5 but will save having to manually define the path for the time being. The theme-language-server gem itself doesn't seem to play well with Windows currently unfortunately.

@charlespwd
Copy link
Contributor

Hey @YourWishes, thanks a lot for this PR! Like you said, had to do a lot of fiddling to have this work but I heavily inspired my work in #35 from this. theme-check-language-server.bat should be available in theme-check v1.2.0. It also works from the shopify-cli with shopify.bat theme language-server.

I'm closing this in favour of #35.

We should have this in prod this PM :)

Thanks again!

@charlespwd charlespwd closed this Jul 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows support
2 participants