summaryrefslogtreecommitdiffstats
path: root/src/config/mod.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-09-04 06:19:32 +0800
committerGitHub <noreply@github.com>2024-09-04 06:19:32 +0800
commit9654445c32e72865c6e3af32dc1e5a3dc411a593 (patch)
tree410abbfcc248a050f3324a8863c4250f0228a1b2 /src/config/mod.rs
parentd57f11445da31eb1183c34d78a93f8b601c2333e (diff)
downloadaichat-9654445c32e72865c6e3af32dc1e5a3dc411a593.tar.gz
fix: `:` can be used as seperator for role arguments (#830)
Diffstat (limited to 'src/config/mod.rs')
-rw-r--r--src/config/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs
index f7f2b2e..3ef68c6 100644
--- a/src/config/mod.rs
+++ b/src/config/mod.rs
@@ -796,6 +796,9 @@ impl Config {
},
None => bail!("No role"),
};
+ if role_name.contains('#') {
+ bail!("Unable to save role with arguments")
+ }
if role_name == TEMP_ROLE_NAME {
role_name = Text::new("Role name:")
.with_validator(|input: &str| {