mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 06:26:15 +01:00
Add a no-session flag to lockdown CLI
This commit is contained in:
@@ -38,6 +38,7 @@ pub fn register() -> JkCommand {
|
|||||||
.with_help("The domain to set/get in")
|
.with_help("The domain to set/get in")
|
||||||
.with_argument(JkArgument::new().required(true)),
|
.with_argument(JkArgument::new().required(true)),
|
||||||
)
|
)
|
||||||
|
.with_flag(JkFlag::new("no-session").with_help("Don't start a TLS session"))
|
||||||
.subcommand_required(true)
|
.subcommand_required(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,10 +47,12 @@ pub async fn main(arguments: &CollectedArguments, provider: Box<dyn IdeviceProvi
|
|||||||
.await
|
.await
|
||||||
.expect("Unable to connect to lockdown");
|
.expect("Unable to connect to lockdown");
|
||||||
|
|
||||||
lockdown_client
|
if !arguments.has_flag("no-session") {
|
||||||
.start_session(&provider.get_pairing_file().await.expect("no pairing file"))
|
lockdown_client
|
||||||
.await
|
.start_session(&provider.get_pairing_file().await.expect("no pairing file"))
|
||||||
.expect("no session");
|
.await
|
||||||
|
.expect("no session");
|
||||||
|
}
|
||||||
|
|
||||||
let domain: Option<String> = arguments.get_flag("domain");
|
let domain: Option<String> = arguments.get_flag("domain");
|
||||||
let domain = domain.as_deref();
|
let domain = domain.as_deref();
|
||||||
|
|||||||
Reference in New Issue
Block a user