Skip to content

Commit 6d5952c

Browse files
authored
Fix issue when EDITOR env var contained arguments (#22)
1 parent 7c8702e commit 6d5952c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/git_debranch/runner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ def _edit_task_data(task_data, variable_to_edit):
3030
with tempfile.NamedTemporaryFile() as tf:
3131
tf.write(value.encode("utf-8"))
3232
tf.flush()
33-
subprocess.run([editor, tf.name])
33+
cmd = editor.split(" ")
34+
cmd.append(tf.name)
35+
subprocess.run(cmd)
3436
tf.seek(0)
3537
value = tf.read().decode("utf-8")
3638
task_data[variable_to_edit] = value

0 commit comments

Comments
 (0)