mirror of
https://github.com/instructkr/claw-code.git
synced 2026-11-18 00:00:00 +08:00
fix(#791): config extra-arg errors now return non-null hint via \n-delimited usage string
This commit is contained in:
1 parent
9968a27e92
commit
93a159dca5
3 files changed
+71
-1
No files matched your search
@@ -1190,8 +1190,9 @@ fn parse_args(args: &[String]) -> Result<CliAction, String> {
|
||||
let tail = &rest[1..];
|
||||
let section = tail.first().cloned();
|
||||
if tail.len() > 1 {
|
||||
// #791: append \n hint so split_error_hint extracts it and hint is non-null
|
||||
return Err(format!(
|
||||
"unexpected extra arguments after `claw config {}`: {}",
|
||||
"unexpected extra arguments after `claw config {}`: {}\nUsage: claw config [env|hooks|model|plugins|mcp|settings]",
|
||||
tail[0],
|
||||
tail[1..].join(" ")
|
||||
));
|
||||
|
||||
Reference in new issue
Block a user