{"thread":{"id":"60436","subject":"GFW fails with ST3 on Windows 11","startedAt":"2023-10-27T07:31:58Z","lastAt":"2023-10-27T12:37:39Z","messageCount":5,"participants":["John","brian m. carlson","Konstantin Khomoutov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"483952","messageId":"cd248c66-fc71-4783-9195-02c8811744b8@app.fastmail.com","threadId":"60436","inReplyTo":null,"subject":"GFW fails with ST3 on Windows 11","fromName":"John","fromEmail":"john@quantbo.com","sentAt":"2023-10-27T07:31:32Z","receivedAt":"2023-10-27T07:31:58Z","isPatch":false,"sender":{"key":"john@quantbo.com","avatar":null},"body":"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:\n\n$ git commit -a\n[…]\nhint: Waiting for your editor to close the file… C:\\Program Files\\Sublime Text 3\\sublime_text.exe: C:Program: command not found\nerror: There was a problem with the editor ‘C:\\Program Files\\Sublime Text 3\\sublime_text.exe’.\nPlease supply the message using either -m or -F option.\n\nDoes anyone know of a fix? To repeat, it’s only a problem on Windows 11.\n"},{"id":"483964","messageId":"ZTuCHVwAhAGJcQDd@tapette.crustytoothpaste.net","threadId":"60436","inReplyTo":"cd248c66-fc71-4783-9195-02c8811744b8@app.fastmail.com","subject":"Re: GFW fails with ST3 on Windows 11","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2023-10-27T09:25:49Z","receivedAt":"2023-10-27T09:25:55Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2023-10-27 at 07:31:32, John wrote:\n> 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:\n> \n> $ git commit -a\n> […]\n> hint: Waiting for your editor to close the file… C:\\Program Files\\Sublime Text 3\\sublime_text.exe: C:Program: command not found\n> error: There was a problem with the editor ‘C:\\Program Files\\Sublime Text 3\\sublime_text.exe’.\n> Please supply the message using either -m or -F option.\n\nI think the \"command not found\" indicates that you may have specified\nyour editor incorrectly.  In Git Bash, can you try the following\ncommands, one at a time, and then commit between each one to see if one\nof them works?\n\n  git config --global core.editor '\"C:/Program Files/Sublime Text 3/sublime_text.exe\"'\n  git config --global core.editor '\"C:\\Program Files\\Sublime Text 3\\sublime_text.exe\"'\n\nI believe that both should work here.\n\nMy guess is that this is the situation hinted at in the FAQ[0], where,\nbecause the editor is passed to the shell (bash), you need to use double\nquotes to prevent it from thinking that you have a program named\n\"C:\\Program\" with arguments \"Files\\Sublime\", \"Text\", and\n\"3\\sublime_text.exe\".\n\nHopefully this works; if not, please let us know, and hopefully someone\non the list who uses Windows can provide some help.  I'm afraid that, as\na Linux user, I'm not able to provide more than a guess here.\n\n[0] https://git-scm.com/docs/gitfaq#configure-editor\n-- \nbrian m. carlson (he/him or they/them)\nToronto, Ontario, CA\n"},{"id":"483973","messageId":"ZTud8HxDxK1UgLCR@tapette.crustytoothpaste.net","threadId":"60436","inReplyTo":"e1de1948-8604-4c8f-961b-d214efa4ed84@app.fastmail.com","subject":"Re: GFW fails with ST3 on Windows 11","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2023-10-27T11:24:32Z","receivedAt":"2023-10-27T11:24:36Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2023-10-27 at 09:59:47, John wrote:\n> Brian,\n> \n> Thanks very much for your suggestions. Unfortunately, after each command, I continue to get the same error messages noted in my original email.\n> \n> Any Windows 11 experts out there--please help.\n> \n> John\n> \n> On Fri, 27 Oct 2023, at 16:25, brian m. carlson wrote:\n> > On 2023-10-27 at 07:31:32, John wrote:\n> >> 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:\n> >> \n> >> $ git commit -a\n> >> […]\n> >> hint: Waiting for your editor to close the file… C:\\Program Files\\Sublime Text 3\\sublime_text.exe: C:Program: command not found\n> >> error: There was a problem with the editor ‘C:\\Program Files\\Sublime Text 3\\sublime_text.exe’.\n> >> Please supply the message using either -m or -F option.\n> >\n> > I think the \"command not found\" indicates that you may have specified\n> > your editor incorrectly.  In Git Bash, can you try the following\n> > commands, one at a time, and then commit between each one to see if one\n> > of them works?\n> >\n> >   git config --global core.editor '\"C:/Program Files/Sublime Text \n> > 3/sublime_text.exe\"'\n> >   git config --global core.editor '\"C:\\Program Files\\Sublime Text \n> > 3\\sublime_text.exe\"'\n> >\n> > I believe that both should work here.\n> >\n> > My guess is that this is the situation hinted at in the FAQ[0], where,\n> > because the editor is passed to the shell (bash), you need to use double\n> > quotes to prevent it from thinking that you have a program named\n> > \"C:\\Program\" with arguments \"Files\\Sublime\", \"Text\", and\n> > \"3\\sublime_text.exe\".\n> >\n> > Hopefully this works; if not, please let us know, and hopefully someone\n> > on the list who uses Windows can provide some help.  I'm afraid that, as\n> > a Linux user, I'm not able to provide more than a guess here.\n> >\n> > [0] https://git-scm.com/docs/gitfaq#configure-editor\n\nIt looks like this was sent to just me and not the list, so forwarding\nit back for additional assistance.\n-- \nbrian m. carlson (he/him or they/them)\nToronto, Ontario, CA\n"},{"id":"483976","messageId":"20231027122957.6mb6vyrqhnlwit6q@carbon","threadId":"60436","inReplyTo":"cd248c66-fc71-4783-9195-02c8811744b8@app.fastmail.com","subject":"Re: GFW fails with ST3 on Windows 11","fromName":"Konstantin Khomoutov","fromEmail":"kostix@bswap.ru","sentAt":"2023-10-27T12:29:57Z","receivedAt":"2023-10-27T12:30:07Z","isPatch":false,"sender":{"key":"kostix@bswap.ru","avatar":null},"body":"On Fri, Oct 27, 2023 at 02:31:32PM +0700, John wrote:\n\n> I have been using Sublime Text 3 as the editor on Git for Windows for years,\n> on Windows 10. I recently purchased a Windows 11 machine. On that machine,\n> when I give GFW the following command, I get the response shown:\n> \n> $ git commit -a\n> […]\n> hint: Waiting for your editor to close the file… C:\\Program Files\\Sublime Text 3\\sublime_text.exe: C:Program: command not found\n> error: There was a problem with the editor ‘C:\\Program Files\\Sublime Text 3\\sublime_text.exe’.\n> Please supply the message using either -m or -F option.\n> \n> Does anyone know of a fix? To repeat, it’s only a problem on Windows 11.\n\nWhat if you change the contents of the GIT_EDITOR (or EDITOR - whichever is\nset) environment variable to contain forward slashes? That is, for the\npathname to read \"C:/Program Files/...\"?\n\nIf that does not work, what if you replace \"C:/\" with \"/c/\" - that is, for the\npathname to read \"/c/Program files/...\"?\n\nPlease note that depending on where this variable is set (in the \"System\"\nblock of setting or \"User\") you might need to reboot or relogin,\ncorrespondingly in order for the setting to be applied to your environment.\n\nAlso please check the core.editor configuration setting - it might be set,\nand then you should try to modify it instead [3].\n\nWhile we're at it, such issues are better discussed on the dedicated mailing\nlist for GfW [1]. Also check the project's issue tracker [2].\n\n 1. https://groups.google.com/g/git-for-windows/\n 2. https://github.com/git-for-windows/git/issues/\n 3. https://github.com/git-for-windows/git/issues/782\n\n"},{"id":"483978","messageId":"20231027123734.x4ziimecgj6isfsa@carbon","threadId":"60436","inReplyTo":"cd248c66-fc71-4783-9195-02c8811744b8@app.fastmail.com","subject":"Re: GFW fails with ST3 on Windows 11","fromName":"Konstantin Khomoutov","fromEmail":"kostix@bswap.ru","sentAt":"2023-10-27T12:37:34Z","receivedAt":"2023-10-27T12:37:39Z","isPatch":false,"sender":{"key":"kostix@bswap.ru","avatar":null},"body":"On Fri, Oct 27, 2023 at 03:29:58PM +0300, Konstantin Khomoutov wrote:\n\n[...]\n> Also please check the core.editor configuration setting - it might be set,\n> and then you should try to modify it instead.\n[...]\n\nThis means Git's configuration setting.\n\nYou might run\n\n  git config --get-all --show-scope core.editor\n\nin your shell to get the values of this setting printed, if set, prefixed with\nthe scope these values are defined in (see `git help config` or [1] for more\ninfo).\n\n 1. https://www.git-scm.com/docs/git-config\n\n"}]}