fix: CLI --mode text 报错'未知模式' — 补充 text 匹配分支
This commit is contained in:
@@ -313,6 +313,10 @@ fn build_text_from_args(args: &Args) -> anyhow::Result<String> {
|
|||||||
.url
|
.url
|
||||||
.clone()
|
.clone()
|
||||||
.ok_or_else(|| anyhow::anyhow!("URL 模式需要 --url")),
|
.ok_or_else(|| anyhow::anyhow!("URL 模式需要 --url")),
|
||||||
|
Some("text") => args
|
||||||
|
.content
|
||||||
|
.clone()
|
||||||
|
.ok_or_else(|| anyhow::anyhow!("文本模式需要提供编码内容")),
|
||||||
Some(m) => anyhow::bail!("未知模式: {m}。支持 text/url/wifi/vcard/email/phone/sms/batch"),
|
Some(m) => anyhow::bail!("未知模式: {m}。支持 text/url/wifi/vcard/email/phone/sms/batch"),
|
||||||
None => args
|
None => args
|
||||||
.content
|
.content
|
||||||
|
|||||||
Reference in New Issue
Block a user