fix: make id mandatory for delete and optional for get/info
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -17,7 +17,9 @@ pub fn mode_get(
|
||||
conn: &mut rusqlite::Connection,
|
||||
data_path: PathBuf,
|
||||
) -> Result<()> {
|
||||
if !ids.is_empty() && !tags.is_empty() {
|
||||
if ids.is_empty() && tags.is_empty() {
|
||||
cmd.error(clap::error::ErrorKind::InvalidValue, "No ID or tags given, you must supply exactly one ID or at least one tag when using --get").exit();
|
||||
} else if !ids.is_empty() && !tags.is_empty() {
|
||||
cmd.error(clap::error::ErrorKind::InvalidValue, "Both ID and tags given, you must supply exactly one ID or at least one tag when using --get").exit();
|
||||
} else if ids.len() > 1 {
|
||||
cmd.error(clap::error::ErrorKind::InvalidValue, "More than one ID given, you must supply exactly one ID or at least one tag when using --get").exit();
|
||||
|
||||
Reference in New Issue
Block a user