Commit 5a525870 authored by Raul Tambre's avatar Raul Tambre Committed by Commit Bot

Support Git editor paths with spaces

Git requires single quotes for paths with spaces.
We however need to convert single quotes to double quotes for Windows to treat such paths as a single path.

Bug: 916922
Change-Id: I89b23552a2a32d5aa58ea4f207690595823692d5
Reviewed-on: https://chromium-review.googlesource.com/c/1467301Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Raul Tambre <raul@tambre.ee>
parent 98a7e803
......@@ -908,7 +908,11 @@ class Settings(object):
def GetGitEditor(self):
"""Return the editor specified in the git config, or None if none is."""
if self.git_editor is None:
self.git_editor = self._GetConfig('core.editor', error_ok=True)
# Git requires single quotes for paths with spaces. We need to replace
# them with double quotes for Windows to treat such paths as a single
# path.
self.git_editor = self._GetConfig(
'core.editor', error_ok=True).replace('\'', '"')
return self.git_editor or None
def GetLintRegex(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment