summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Thyrrestrup <tt@LEGO.com>2022-10-14 09:16:44 +0200
committerDamien George <damien@micropython.org>2022-11-25 15:02:52 +1100
commit2fcd93cdd0cf33a83346eb4a6ed47ec1404a985b (patch)
tree15dd61889d80f4b122ffe4924c4ba8638c604c85
parentf3e4c505d1a2d29caf0a6095445c53f0b493208f (diff)
tools/mpremote: Allow EDITOR environment variable to work on Windows.
-rw-r--r--tools/mpremote/mpremote/commands.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/mpremote/mpremote/commands.py b/tools/mpremote/mpremote/commands.py
index 558cd82f1..3bd8732bd 100644
--- a/tools/mpremote/mpremote/commands.py
+++ b/tools/mpremote/mpremote/commands.py
@@ -174,7 +174,7 @@ def do_edit(state, args):
os.close(dest_fd)
state.pyb.fs_touch(src)
state.pyb.fs_get(src, dest, progress_callback=show_progress_bar)
- if os.system("$EDITOR '%s'" % (dest,)) == 0:
+ if os.system('%s "%s"' % (os.getenv("EDITOR"), dest)) == 0:
state.pyb.fs_put(dest, src, progress_callback=show_progress_bar)
finally:
os.unlink(dest)