From 5fb967a35319ea68179c837c9ce878715190219b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=88=AA=E5=AE=87?= <3364451258@qq.com> Date: Sat, 20 Jun 2026 17:32:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20CLI=20--mode=20text=20=E6=8A=A5=E9=94=99?= =?UTF-8?q?'=E6=9C=AA=E7=9F=A5=E6=A8=A1=E5=BC=8F'=20=E2=80=94=20=E8=A1=A5?= =?UTF-8?q?=E5=85=85=20text=20=E5=8C=B9=E9=85=8D=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cli/src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cli/src/main.rs b/cli/src/main.rs index 8cab4f5..064dda4 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -313,6 +313,10 @@ fn build_text_from_args(args: &Args) -> anyhow::Result { .url .clone() .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"), None => args .content