env activate: use Win-compatible print on Windows (#42755)
Use "echo" instead of "printf" on Windows.
This commit is contained in:
parent
7d728822f0
commit
4bc52fc1a3
@ -270,7 +270,8 @@ def create_temp_env_directory():
|
|||||||
def _tty_info(msg):
|
def _tty_info(msg):
|
||||||
"""tty.info like function that prints the equivalent printf statement for eval."""
|
"""tty.info like function that prints the equivalent printf statement for eval."""
|
||||||
decorated = f'{colorize("@*b{==>}")} {msg}\n'
|
decorated = f'{colorize("@*b{==>}")} {msg}\n'
|
||||||
print(f"printf {shlex.quote(decorated)};")
|
executor = "echo" if sys.platform == "win32" else "printf"
|
||||||
|
print(f"{executor} {shlex.quote(decorated)};")
|
||||||
|
|
||||||
|
|
||||||
def env_activate(args):
|
def env_activate(args):
|
||||||
|
Loading…
Reference in New Issue
Block a user