aboutsummaryrefslogtreecommitdiff
path: root/cli.py
diff options
context:
space:
mode:
authorGravatar rummsi1337 <8877468+rummsi1337@users.noreply.github.com> 2023-11-06 10:26:15 +0100
committerGravatar GitHub <noreply@github.com> 2023-11-06 10:26:15 +0100
commit25c6d019fed825da7dfd3e640b60b5612ee3b396 (patch)
tree78bfb79b27b7aeb10add9b9fe3d267932bb6fd84 /cli.py
parentAGENT_JARVIS entering the arena (#6118) (diff)
downloadAuto-GPT-25c6d019fed825da7dfd3e640b60b5612ee3b396.tar.gz
Auto-GPT-25c6d019fed825da7dfd3e640b60b5612ee3b396.tar.bz2
Auto-GPT-25c6d019fed825da7dfd3e640b60b5612ee3b396.zip
Fix for agent_name regex (#6108)
The improved regex was introduced with https://github.com/Significant-Gravitas/AutoGPT/pull/6096 However, there seems to be an issue with the updated regex; The uppercase meta-character `\W` only matches non-word characters, i.e. everything that is NOT [A-Za-z0-9_]. What you actually want is to use the lowercase `\w` character. Co-authored-by: Simon Rummert <09.milieu.motes@icloud.com>
Diffstat (limited to 'cli.py')
-rw-r--r--cli.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli.py b/cli.py
index 0887e4c4f..540eecc6e 100644
--- a/cli.py
+++ b/cli.py
@@ -219,7 +219,7 @@ def create(agent_name):
import re
import shutil
- if not re.match("\W*$", agent_name):
+ if not re.match("\w*$", agent_name):
click.echo(
click.style(
f"😞 Agent name '{agent_name}' is not valid. It should not contain spaces or special characters other than -_",