Merge branch 'bugfix/menuconfig_argv_encoding' into 'master'
menuconfig: fix the MENUCONFIG_STYLE encoding issue and CLI env issue See merge request espressif/esp-idf!6910
This commit is contained in:
commit
f78b2158b1
2 changed files with 4 additions and 2 deletions
|
@ -679,7 +679,7 @@ def init_cli(verbose_output=None):
|
||||||
def main():
|
def main():
|
||||||
checks_output = check_environment()
|
checks_output = check_environment()
|
||||||
cli = init_cli(verbose_output=checks_output)
|
cli = init_cli(verbose_output=checks_output)
|
||||||
cli(prog_name=PROG)
|
cli(sys.argv[1:], prog_name=PROG)
|
||||||
|
|
||||||
|
|
||||||
def _valid_unicode_config():
|
def _valid_unicode_config():
|
||||||
|
|
|
@ -35,7 +35,9 @@ def action_extensions(base_actions, project_path):
|
||||||
Menuconfig target is build_target extended with the style argument for setting the value for the environment
|
Menuconfig target is build_target extended with the style argument for setting the value for the environment
|
||||||
variable.
|
variable.
|
||||||
"""
|
"""
|
||||||
os.environ['MENUCONFIG_STYLE'] = style
|
# The subprocess lib cannot accept environment variables as "unicode" . This is a problem
|
||||||
|
# only in Python 2.
|
||||||
|
os.environ['MENUCONFIG_STYLE'] = style.encode(sys.getfilesystemencoding() or 'utf-8')
|
||||||
build_target(target_name, ctx, args)
|
build_target(target_name, ctx, args)
|
||||||
|
|
||||||
def fallback_target(target_name, ctx, args):
|
def fallback_target(target_name, ctx, args):
|
||||||
|
|
Loading…
Reference in a new issue