mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-29 08:56:44 +00:00
fix(#786): dump-manifests --manifests-dir missing-value errors now return typed missing_flag_value kind + non-null hint
This commit is contained in:
@@ -2159,14 +2159,15 @@ fn parse_dump_manifests_args(
|
||||
if arg == "--manifests-dir" {
|
||||
let value = args
|
||||
.get(index + 1)
|
||||
.ok_or_else(|| String::from("--manifests-dir requires a path"))?;
|
||||
.ok_or_else(|| String::from("missing_flag_value: --manifests-dir requires a path.\nUsage: claw dump-manifests --manifests-dir <path> [--output-format json]"))?;
|
||||
manifests_dir = Some(PathBuf::from(value));
|
||||
index += 2;
|
||||
continue;
|
||||
}
|
||||
if let Some(value) = arg.strip_prefix("--manifests-dir=") {
|
||||
if value.is_empty() {
|
||||
return Err(String::from("--manifests-dir requires a path"));
|
||||
// #786: empty --manifests-dir= is also a missing value
|
||||
return Err(String::from("missing_flag_value: --manifests-dir requires a path.\nUsage: claw dump-manifests --manifests-dir <path> [--output-format json]"));
|
||||
}
|
||||
manifests_dir = Some(PathBuf::from(value));
|
||||
index += 1;
|
||||
|
||||
Reference in New Issue
Block a user