Page MenuHomePhabricator

editor detection only supports a single argument
Closed, DeclinedPublic


The Win32 editor detection in pywikibot/ looks for registry entries such as

"Foo.exe" "%1"

It detects the "%1 , and discards everything after it because it pywikibot/ assumes it is a single command.

This is probably a Win32-only problem, however the same problem will occur if the environment variable EDITOR contains additional arguments.

Event Timeline

jayvdb raised the priority of this task from to Lowest.
jayvdb updated the task description. (Show Details)
jayvdb added a project: Pywikibot.
jayvdb subscribed. also uses config.editor.lower().endswith('notepad++.exe') , which will fail to match if the program name if quotes are used, such as "C:\My Dir\notepad++.exe"

Xqt subscribed.

This tast no longer match the current code

Change 926170 had a related patch set uploaded (by ElSeiver; author: ElSeiver):

[pywikibot/core@master] TextEditor.editor: Use shlex to parse editor name

Change 926170 merged by jenkins-bot:

[pywikibot/core@master] TextEditor.editor: Use shlex to parse editor name