Improvement of the regular expression (#6096)

This commit is contained in:
Evgenii
2023-11-03 13:07:03 +03:00
committed by GitHub
parent f7340e83cc
commit aef512e49e

2
cli.py
View File

@@ -219,7 +219,7 @@ def create(agent_name):
import re import re
import shutil import shutil
if not re.match("^[a-zA-Z0-9_-]*$", agent_name): if not re.match("\W*$", agent_name):
click.echo( click.echo(
click.style( click.style(
f"😞 Agent name '{agent_name}' is not valid. It should not contain spaces or special characters other than -_", f"😞 Agent name '{agent_name}' is not valid. It should not contain spaces or special characters other than -_",