diff mercurial/debugcommands.py @ 36342:94a1ff16f362

debuginstall: do not parse editor command in posix way on Windows An editor command is executed by a system shell, which is cmd.exe on Windows.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 17 Feb 2018 13:13:04 +0900
parents 564dec70b50c
children 3f67c56a5fd7
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Sun Feb 18 22:13:25 2018 +0900
+++ b/mercurial/debugcommands.py	Sat Feb 17 13:13:04 2018 +0900
@@ -1240,7 +1240,7 @@
     # editor
     editor = ui.geteditor()
     editor = util.expandpath(editor)
-    editorbin = pycompat.shlexsplit(editor)[0]
+    editorbin = pycompat.shlexsplit(editor, posix=not pycompat.iswindows)[0]
     fm.write('editor', _("checking commit editor... (%s)\n"), editorbin)
     cmdpath = util.findexe(editorbin)
     fm.condwrite(not cmdpath and editor == 'vi', 'vinotfound',