Auto-install protocol handler when exe run without args
This commit is contained in:
@@ -138,9 +138,15 @@ fn main() -> Result<()> {
|
||||
if let Some(code) = cli.support_code {
|
||||
run_agent_mode(Some(code))
|
||||
} else {
|
||||
// No args: check if we should auto-detect mode
|
||||
// For now, default to agent mode
|
||||
run_agent_mode(None)
|
||||
// No args: check if protocol handler is installed
|
||||
// If not, run install mode (user likely downloaded from web)
|
||||
if !install::is_protocol_handler_registered() {
|
||||
info!("Protocol handler not registered, running installer");
|
||||
run_install(false)
|
||||
} else {
|
||||
// Protocol handler exists, run as agent
|
||||
run_agent_mode(None)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user