[Webkit-unassigned] [Bug 248675] New: commit-log-editor doesn't handle a core.editor path with spaces well, complains about an invalid path
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Dec 2 12:42:42 PST 2022
https://bugs.webkit.org/show_bug.cgi?id=248675
Bug ID: 248675
Summary: commit-log-editor doesn't handle a core.editor path
with spaces well, complains about an invalid path
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Tools / Tests
Assignee: webkit-unassigned at lists.webkit.org
Reporter: eryn_wells at apple.com
When trying to post a patch for review, I see this error:
```
Amending commit f003c023cdbb3a715efefdd769179ac642a5a80e
hint: Waiting for your editor to close the file... Can't exec "/Applications/Sublime\": No such file or directory at ../OpenSource/Tools/Scripts/commit-log-editor line 180.
Running status to find changed, added, or removed files.
No changes found.
Can't exec "/Applications/Sublime\": No such file or directory at ../OpenSource/Tools/Scripts/commit-log-editor line 227.
Aborting commit due to empty commit message.
```
I took a look at commit-log-editor and found that it's trying to exec the editor command on line 180 like this:
```
exec (@editor, @ARGV) if $existingLog && $keepExistingLog;
```
@editor is being set starting on line 93 by first consulting Git's global core.editor setting:
```
git config --global --get core.editor
```
That setting is set to:
```
$ git config --global --get core.editor
/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl --new-window --wait
```
Further down, on line 131, the output of that git command is split by spaces. I think this is the source of the bug.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221202/42bb0c4d/attachment.htm>
More information about the webkit-unassigned
mailing list