* GFW fails with ST3 on Windows 11
@ 2023-10-27 7:31 John
2023-10-27 9:25 ` brian m. carlson
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: John @ 2023-10-27 7:31 UTC (permalink / raw)
To: git
I have been using Sublime Text 3 as the editor on Git for Windows for years, on Windows 10. I recently purchased a Windows 11 machine. On that machine, when I give GFW the following command, I get the response shown:
$ git commit -a
[…]
hint: Waiting for your editor to close the file… C:\Program Files\Sublime Text 3\sublime_text.exe: C:Program: command not found
error: There was a problem with the editor ‘C:\Program Files\Sublime Text 3\sublime_text.exe’.
Please supply the message using either -m or -F option.
Does anyone know of a fix? To repeat, it’s only a problem on Windows 11.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GFW fails with ST3 on Windows 11
2023-10-27 7:31 GFW fails with ST3 on Windows 11 John
@ 2023-10-27 9:25 ` brian m. carlson
[not found] ` <e1de1948-8604-4c8f-961b-d214efa4ed84@app.fastmail.com>
2023-10-27 12:29 ` Konstantin Khomoutov
2023-10-27 12:37 ` Konstantin Khomoutov
2 siblings, 1 reply; 5+ messages in thread
From: brian m. carlson @ 2023-10-27 9:25 UTC (permalink / raw)
To: John; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 1663 bytes --]
On 2023-10-27 at 07:31:32, John wrote:
> I have been using Sublime Text 3 as the editor on Git for Windows for years, on Windows 10. I recently purchased a Windows 11 machine. On that machine, when I give GFW the following command, I get the response shown:
>
> $ git commit -a
> […]
> hint: Waiting for your editor to close the file… C:\Program Files\Sublime Text 3\sublime_text.exe: C:Program: command not found
> error: There was a problem with the editor ‘C:\Program Files\Sublime Text 3\sublime_text.exe’.
> Please supply the message using either -m or -F option.
I think the "command not found" indicates that you may have specified
your editor incorrectly. In Git Bash, can you try the following
commands, one at a time, and then commit between each one to see if one
of them works?
git config --global core.editor '"C:/Program Files/Sublime Text 3/sublime_text.exe"'
git config --global core.editor '"C:\Program Files\Sublime Text 3\sublime_text.exe"'
I believe that both should work here.
My guess is that this is the situation hinted at in the FAQ[0], where,
because the editor is passed to the shell (bash), you need to use double
quotes to prevent it from thinking that you have a program named
"C:\Program" with arguments "Files\Sublime", "Text", and
"3\sublime_text.exe".
Hopefully this works; if not, please let us know, and hopefully someone
on the list who uses Windows can provide some help. I'm afraid that, as
a Linux user, I'm not able to provide more than a guess here.
[0] https://git-scm.com/docs/gitfaq#configure-editor
--
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GFW fails with ST3 on Windows 11
[not found] ` <e1de1948-8604-4c8f-961b-d214efa4ed84@app.fastmail.com>
@ 2023-10-27 11:24 ` brian m. carlson
0 siblings, 0 replies; 5+ messages in thread
From: brian m. carlson @ 2023-10-27 11:24 UTC (permalink / raw)
To: John, git
[-- Attachment #1: Type: text/plain, Size: 2221 bytes --]
On 2023-10-27 at 09:59:47, John wrote:
> Brian,
>
> Thanks very much for your suggestions. Unfortunately, after each command, I continue to get the same error messages noted in my original email.
>
> Any Windows 11 experts out there--please help.
>
> John
>
> On Fri, 27 Oct 2023, at 16:25, brian m. carlson wrote:
> > On 2023-10-27 at 07:31:32, John wrote:
> >> I have been using Sublime Text 3 as the editor on Git for Windows for years, on Windows 10. I recently purchased a Windows 11 machine. On that machine, when I give GFW the following command, I get the response shown:
> >>
> >> $ git commit -a
> >> […]
> >> hint: Waiting for your editor to close the file… C:\Program Files\Sublime Text 3\sublime_text.exe: C:Program: command not found
> >> error: There was a problem with the editor ‘C:\Program Files\Sublime Text 3\sublime_text.exe’.
> >> Please supply the message using either -m or -F option.
> >
> > I think the "command not found" indicates that you may have specified
> > your editor incorrectly. In Git Bash, can you try the following
> > commands, one at a time, and then commit between each one to see if one
> > of them works?
> >
> > git config --global core.editor '"C:/Program Files/Sublime Text
> > 3/sublime_text.exe"'
> > git config --global core.editor '"C:\Program Files\Sublime Text
> > 3\sublime_text.exe"'
> >
> > I believe that both should work here.
> >
> > My guess is that this is the situation hinted at in the FAQ[0], where,
> > because the editor is passed to the shell (bash), you need to use double
> > quotes to prevent it from thinking that you have a program named
> > "C:\Program" with arguments "Files\Sublime", "Text", and
> > "3\sublime_text.exe".
> >
> > Hopefully this works; if not, please let us know, and hopefully someone
> > on the list who uses Windows can provide some help. I'm afraid that, as
> > a Linux user, I'm not able to provide more than a guess here.
> >
> > [0] https://git-scm.com/docs/gitfaq#configure-editor
It looks like this was sent to just me and not the list, so forwarding
it back for additional assistance.
--
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GFW fails with ST3 on Windows 11
2023-10-27 7:31 GFW fails with ST3 on Windows 11 John
2023-10-27 9:25 ` brian m. carlson
@ 2023-10-27 12:29 ` Konstantin Khomoutov
2023-10-27 12:37 ` Konstantin Khomoutov
2 siblings, 0 replies; 5+ messages in thread
From: Konstantin Khomoutov @ 2023-10-27 12:29 UTC (permalink / raw)
To: git
On Fri, Oct 27, 2023 at 02:31:32PM +0700, John wrote:
> I have been using Sublime Text 3 as the editor on Git for Windows for years,
> on Windows 10. I recently purchased a Windows 11 machine. On that machine,
> when I give GFW the following command, I get the response shown:
>
> $ git commit -a
> […]
> hint: Waiting for your editor to close the file… C:\Program Files\Sublime Text 3\sublime_text.exe: C:Program: command not found
> error: There was a problem with the editor ‘C:\Program Files\Sublime Text 3\sublime_text.exe’.
> Please supply the message using either -m or -F option.
>
> Does anyone know of a fix? To repeat, it’s only a problem on Windows 11.
What if you change the contents of the GIT_EDITOR (or EDITOR - whichever is
set) environment variable to contain forward slashes? That is, for the
pathname to read "C:/Program Files/..."?
If that does not work, what if you replace "C:/" with "/c/" - that is, for the
pathname to read "/c/Program files/..."?
Please note that depending on where this variable is set (in the "System"
block of setting or "User") you might need to reboot or relogin,
correspondingly in order for the setting to be applied to your environment.
Also please check the core.editor configuration setting - it might be set,
and then you should try to modify it instead [3].
While we're at it, such issues are better discussed on the dedicated mailing
list for GfW [1]. Also check the project's issue tracker [2].
1. https://groups.google.com/g/git-for-windows/
2. https://github.com/git-for-windows/git/issues/
3. https://github.com/git-for-windows/git/issues/782
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GFW fails with ST3 on Windows 11
2023-10-27 7:31 GFW fails with ST3 on Windows 11 John
2023-10-27 9:25 ` brian m. carlson
2023-10-27 12:29 ` Konstantin Khomoutov
@ 2023-10-27 12:37 ` Konstantin Khomoutov
2 siblings, 0 replies; 5+ messages in thread
From: Konstantin Khomoutov @ 2023-10-27 12:37 UTC (permalink / raw)
To: git
On Fri, Oct 27, 2023 at 03:29:58PM +0300, Konstantin Khomoutov wrote:
[...]
> Also please check the core.editor configuration setting - it might be set,
> and then you should try to modify it instead.
[...]
This means Git's configuration setting.
You might run
git config --get-all --show-scope core.editor
in your shell to get the values of this setting printed, if set, prefixed with
the scope these values are defined in (see `git help config` or [1] for more
info).
1. https://www.git-scm.com/docs/git-config
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-10-27 12:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-27 7:31 GFW fails with ST3 on Windows 11 John
2023-10-27 9:25 ` brian m. carlson
[not found] ` <e1de1948-8604-4c8f-961b-d214efa4ed84@app.fastmail.com>
2023-10-27 11:24 ` brian m. carlson
2023-10-27 12:29 ` Konstantin Khomoutov
2023-10-27 12:37 ` Konstantin Khomoutov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox