-
Notifications
You must be signed in to change notification settings - Fork 151
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 switch #393
Comments
Please provide more information. Otherwise, I have no way of knowing what is wrong. In particular, please provide an That being said, perhaps your version of Git is too old. |
The exact error is error: Failed to run "git" straight-process buffer shows
|
It sounds like you need to install a |
I can help with this -- just got it working on Win10, Emacs27 nightly (2019-10-10).
diff --git a/straight.el b/straight.el
index 1dd3632..4e9c7bd 100644
--- a/straight.el
+++ b/straight.el
@@ -3510,7 +3510,7 @@ modified since their last builds.")
(append (list "-o"
"-path"
(format
- "%s/*" (straight--repos-dir
+ "\"%s/*\"" (straight--repos-dir
local-repo))
newer-or-newermt
mtime-or-file to avoid the This works for me; (By the way it would be nice if that invocation of "find" could go into the |
Done! Do you want to submit a pull request for your change to improve functionality on Windows? |
Sure, no problem. One question: is it OK to always quote that arg, or is there another level of arg-quoting that happens before the command gets executed on Linux/Mac? I don't want to break anything for other OSes. |
In general, it is wrong to put quotes in arguments. The fact that this is needed on Windows is a bizarre quirk, and doing it anywhere else will completely break the command. To work around the Windows problem, I would suggest adding the quoting behavior at the level of |
True, of course -- as long as the cmd is started via fork/exec or |
Thank you all for investigating this. Is there any news about the quoting patch? |
I am not currently aware of any work in this direction. But I think it should be a straightforward change to make by someone who has access to a Windows machine for testing :) |
I think that I might be able to open a PR that uses Powershell instead of |
This has been on my list for a long time, sorry -- rather than the simple patch above, I wanted to investigate the best place to put the quotes which means figuring out exactly how the subprocess is started and how the args are passed and whether there's some arg-quoting already happening further down the create-process pipeline and if so why it isn't working. So I haven't really started on it. If you folks have time please do dig into it. |
@garyo can we at least have the patch in until someone can take a look? Just spent ages debugging this... |
The pull request #473 has been merged, which should address your concern. |
This thread is being closed automatically by Tidier because it is labeled with "waiting on response" and has not seen any activity for 90 days. But don't worry—if you have any information that might advance the discussion, leave a comment and I will be happy to reopen the thread :) |
I am still seeing this error on Windows. I have even updated straight to the latest version, to no avail. Am I missing something? Emacs version is 27.1. |
Could you please provide the following?:
Have you tried the solution here?: #393 (comment) |
This thread is being closed automatically by Tidier because it is labeled with "waiting on response" and has not seen any activity for 90 days. But don't worry—if you have any information that might advance the discussion, leave a comment and I will be happy to reopen the thread :) |
"git" "clone" "--origin" "origin" "--no-checkout" "<url to package.git" "~/.emacs.d/straight/repos/package/"
Packages are not downloading automatically
i have to manually git clone each one.
The text was updated successfully, but these errors were encountered: