mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 11:17:20 +02:00
tools: Fix idf.py menuconfig characters in MSYS2
This commit is contained in:
committed by
Roland Dobai
parent
c875e5698a
commit
4f193dfa71
19
tools/idf.py
19
tools/idf.py
@ -1282,13 +1282,18 @@ if __name__ == "__main__":
|
|||||||
if ("MSYSTEM" in os.environ) and (
|
if ("MSYSTEM" in os.environ) and (
|
||||||
not os.environ.get("_", "").endswith(WINPTY_EXE) and WINPTY_VAR not in os.environ
|
not os.environ.get("_", "").endswith(WINPTY_EXE) and WINPTY_VAR not in os.environ
|
||||||
):
|
):
|
||||||
os.environ[WINPTY_VAR] = "1" # the value is of no interest to us
|
|
||||||
# idf.py calls itself with "winpty" and WINPTY global variable set
|
if 'menuconfig' in sys.argv:
|
||||||
ret = subprocess.call(
|
# don't use winpty for menuconfig because it will print weird characters
|
||||||
[WINPTY_EXE, sys.executable] + sys.argv, env=os.environ
|
main()
|
||||||
)
|
else:
|
||||||
if ret:
|
os.environ[WINPTY_VAR] = "1" # the value is of no interest to us
|
||||||
raise SystemExit(ret)
|
# idf.py calls itself with "winpty" and WINPTY global variable set
|
||||||
|
ret = subprocess.call(
|
||||||
|
[WINPTY_EXE, sys.executable] + sys.argv, env=os.environ
|
||||||
|
)
|
||||||
|
if ret:
|
||||||
|
raise SystemExit(ret)
|
||||||
|
|
||||||
elif os.name == "posix" and not _valid_unicode_config():
|
elif os.name == "posix" and not _valid_unicode_config():
|
||||||
# Trying to find best utf-8 locale available on the system and restart python with it
|
# Trying to find best utf-8 locale available on the system and restart python with it
|
||||||
|
Reference in New Issue
Block a user