avoid crash when unicode in title (#9254)

This commit is contained in:
Sofie Van Landeghem 2021-09-22 21:01:34 +02:00 committed by GitHub
parent 17802836be
commit 3fc3b7a13a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
from typing import Optional, List, Dict, Sequence, Any, Iterable from typing import Optional, List, Dict, Sequence, Any, Iterable
from pathlib import Path from pathlib import Path
from wasabi import msg from wasabi import msg
from wasabi.util import locale_escape
import sys import sys
import srsly import srsly
import typer import typer
@ -135,7 +136,7 @@ def print_run_help(project_dir: Path, subcommand: Optional[str] = None) -> None:
print("") print("")
title = config.get("title") title = config.get("title")
if title: if title:
print(f"{title}\n") print(f"{locale_escape(title)}\n")
if config_commands: if config_commands:
print(f"Available commands in {PROJECT_FILE}") print(f"Available commands in {PROJECT_FILE}")
print(f"Usage: {COMMAND} project run [COMMAND] {project_loc}") print(f"Usage: {COMMAND} project run [COMMAND] {project_loc}")