diff options
author | rummsi1337 <8877468+rummsi1337@users.noreply.github.com> | 2023-11-06 10:26:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-06 10:26:15 +0100 |
commit | 25c6d019fed825da7dfd3e640b60b5612ee3b396 (patch) | |
tree | 78bfb79b27b7aeb10add9b9fe3d267932bb6fd84 /cli.py | |
parent | AGENT_JARVIS entering the arena (#6118) (diff) | |
download | Auto-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.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 -_", |