mirror of
https://github.com/Dev-Wiki/git-repo.git
synced 2025-09-26 01:42:13 +08:00
Make repo's editor work when the editor is a commandline with
multiple args.
This commit is contained in:
@@ -69,14 +69,14 @@ least one of these before using this command."""
|
||||
Returns:
|
||||
new value of edited text; None if editing did not succeed
|
||||
"""
|
||||
editor = cls._GetEditor()
|
||||
editor = cls._GetEditor().split()
|
||||
fd, path = tempfile.mkstemp()
|
||||
try:
|
||||
os.write(fd, data)
|
||||
os.close(fd)
|
||||
fd = None
|
||||
|
||||
if subprocess.Popen([editor, path]).wait() != 0:
|
||||
if subprocess.Popen(editor + [path]).wait() != 0:
|
||||
raise EditorError()
|
||||
return open(path).read()
|
||||
finally:
|
||||
|
Reference in New Issue
Block a user