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

buf format does not run on Windows #3505

Closed
jlumsden-mts opened this issue Dec 2, 2024 · 3 comments
Closed

buf format does not run on Windows #3505

jlumsden-mts opened this issue Dec 2, 2024 · 3 comments
Labels
Bug Something isn't working

Comments

@jlumsden-mts
Copy link

GitHub repository with your minimal reproducible example (do not leave this field blank or fill out this field with "github.com/bufbuild/buf" or we will automatically close your issue, see the instructions above!)

github.com/bufbuild/buf

Commands

buf format

Output

Failure: exec: "diff": executable file not found in %PATH%

Expected Output

Works as usual, still gives the same error even without the -d flag

Anything else?

Running v1.47.2 x86_64 on Windows 11.

It looks like it assumes "diff" is available on Windows which isn't guaranteed as it's a Unix utility. Closest Windows equivalent would be "fc" for file compare.

@jlumsden-mts jlumsden-mts added the Bug Something isn't working label Dec 2, 2024
@doriable
Copy link
Member

doriable commented Dec 2, 2024

Hello, this is a duplicate of this issue: #1251.
There are a couple of workarounds provided, diff is available as an alias through the Powershell environment.

@doriable doriable closed this as completed Dec 2, 2024
@jlumsden-mts
Copy link
Author

Thanks @doriable for pointing out the workaround, I did search for this in issues prior to raising it but must have missed that one.

I would suggest though that's it's worth, at a minimum, updating the official documentation to point at that workaround or better yet look at fixing it so the workaround isn't required.

@doriable
Copy link
Member

doriable commented Dec 3, 2024

This is an excellent suggestion! I'll pass that along to the documentation folks and we'll put something in :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants