"git" "clone" "--origin" "origin" "--no-checkout" " Packages are not downloading automatically
i have to manually git clone each one.
Please provide more information. Otherwise, I have no way of knowing what is wrong. In particular, please provide an init.el file that I can put in an empty user-emacs-directory and reproduce the error, as well as versions of all relevant software.
That being said, perhaps your version of Git is too old.
The exact error is error: Failed to run "git"
I'm on windows
straight-process buffer shows
$ cd "c:/emacs/emacs-26.2-x86_64/bin/"
$ "find" "/dev/null" "-newermt" "2018-01-01 12:00:00"
FIND: Invalid switch
[Return code: 2]
$ cd "c:/Users/Avik/.emacs.d/straight/repos/"
$ "git" "clone" "--origin" "origin" "--no-checkout" "https://github.com/emacs-straight/seq.git" "c:/Users/Avik/.emacs.d/straight/repos/seq/"
[File error while searching for program]
It sounds like you need to install a find program which has support for -newermt. It also sounds like you need to install Git, or perhaps add it to your PATH. How one does these things on Windows, I have no idea. Perhaps somebody who does use Emacs on Windows can help you with that.
I can help with this -- just got it working on Win10, Emacs27 nightly (2019-10-10).
exec-path below)usr/bin is in exec-path (usually c:/msys2/usr/bin but may be different depending on how you install msys2)(executable-find "find") returns the proper find, not /Windows/system32/find.exestraight.el find is still run via cmd.exe which has weird quoting rules, you may need this patch: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 /* from getting expanded by the shell and turned into multiple args which would cause the "find" to fail. With this patch it gets passed to find as a single arg.
This works for me; M-x straight-check-all now works with no errors/warnings.
(By the way it would be nice if that invocation of "find" could go into the *straight-process* buffer so we can see the result and any additional output.)
(By the way it would be nice if that invocation of "find" could go into the straight-process buffer so we can see the result and any additional output.)
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 straight--call (i.e. where the arguments are passed to call-process). That way, it will be centralized.
In general, it is wrong to put quotes in arguments
True, of course -- as long as the cmd is started via fork/exec or CreateProcess and not via a shell. I don't know much about how call-process works on Windows, but this issue makes me think it's starting a cmd.exe shell and passing the args to it. I'll look into it further. I expect using shell-quote-argument will be fine on Windows but I'll confirm the details.
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 find in Windows. I'll look into that.
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鈥攊f 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?:
straight-version*straight-process-buffer*Have you tried the solution here?: https://github.com/raxod502/straight.el/issues/393#issuecomment-554029770
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鈥攊f you have any information that might advance the discussion, leave a comment and I will be happy to reopen the thread :)
Most helpful comment
The pull request #473 has been merged, which should address your concern.