Add a no-session flag to lockdown CLI

This commit is contained in:
Jackson Coxson
2026-01-19 16:02:13 -07:00
parent 5bb9330cf6
commit 142708c289

View File

@@ -38,6 +38,7 @@ pub fn register() -> JkCommand {
.with_help("The domain to set/get in")
.with_argument(JkArgument::new().required(true)),
)
.with_flag(JkFlag::new("no-session").with_help("Don't start a TLS session"))
.subcommand_required(true)
}
@@ -46,10 +47,12 @@ pub async fn main(arguments: &CollectedArguments, provider: Box<dyn IdeviceProvi
.await
.expect("Unable to connect to lockdown");
if !arguments.has_flag("no-session") {
lockdown_client
.start_session(&provider.get_pairing_file().await.expect("no pairing file"))
.await
.expect("no session");
}
let domain: Option<String> = arguments.get_flag("domain");
let domain = domain.as_deref();