tools/mpremote: Allow EDITOR environment variable to work on Windows.
This commit is contained in:
parent
f3e4c505d1
commit
2fcd93cdd0
tools/mpremote/mpremote
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue