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

Invalid argument #276

Open
arijit-gogoi opened this issue Dec 28, 2023 · 3 comments
Open

Invalid argument #276

arijit-gogoi opened this issue Dec 28, 2023 · 3 comments

Comments

@arijit-gogoi
Copy link

Apheleia gives exits with exit code 2 on Windows 11 with doom emacs:

Thu Dec 28 23:23:22 2023 :: c:/Users/hp/workspace/waiig/monkey-lang/token/
$ "diff" "--rcs" "--strip-trailing-cr" "--" "c:/Users/hp/workspace/waiig/monkey-lang/token/token.go" "-"

diff.exe: -: Invalid argument

Command succeeded with exit code 2.
@raxod502
Copy link
Member

Sounds like a Windows problem. If you can suggest an alternative command line syntax for diff that'll work in this environment, I could implement it.

@yukiteruamano
Copy link

Hi @raxod502 !

This issue is very similar to what happens to me. You will see in OpenBSD the "diff" command that comes with it does not have the "--rcs" "--strip-trailing-cr" options and therefore fails with the same error code.

One way I see to solve this issue is to create a defcustom in which we can define the correct diff binary command (in my case gdiff, from GNU Coreutils, in the case of Windows to the correct diff binary).

In this link there is an idea of how this change would be implemented.

@raxod502
Copy link
Member

Right, that makes sense. I'll have the default value be gdiff if available, diff otherwise. And the user can customize. On the first invocation, it will check to verify that the necessary options are supported, and report a better error if they aren't.

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

No branches or pull requests

3 participants