Merge branch 'bugfix/idfpy_monitor_msys_v3.1' into 'release/v3.1'

tools: fix idf.py monitor for MSYS (backport v3.1)

See merge request idf/esp-idf!3897
This commit is contained in:
Angus Gratton 2019-01-24 14:50:47 +08:00
commit 38edc33bb8

View file

@ -71,7 +71,7 @@ def _run_tool(tool_name, args, cwd):
return arg
display_args = " ".join(quote_arg(arg) for arg in args)
print("Running %s in directory %s" % (tool_name, quote_arg(cwd)))
print('Executing "%s"...' % display_args)
print('Executing "%s"...' % str(display_args))
try:
# Note: we explicitly pass in os.environ here, as we may have set IDF_PATH there during startup
subprocess.check_call(args, env=os.environ, cwd=cwd)
@ -272,7 +272,7 @@ def monitor(action, args):
idf_py = [ PYTHON ] + get_commandline_options() # commands to re-run idf.py
monitor_args += [ "-m", " ".join("'%s'" % a for a in idf_py) ]
if "MSYSTEM" is os.environ:
if "MSYSTEM" in os.environ:
monitor_args = [ "winpty" ] + monitor_args
_run_tool("idf_monitor", monitor_args, args.project_dir)