()
| 362 | } |
| 363 | |
| 364 | fn installed_credentials() -> anyhow::Result<Option<ServiceCredentials>> { |
| 365 | let Some(arguments) = installed_arguments()? else { |
| 366 | return Ok(None); |
| 367 | }; |
| 368 | Ok(Some(ServiceCredentials { |
| 369 | access_token: argument_value(&arguments, "--access-token"), |
| 370 | pairing_code: argument_value(&arguments, "--pairing-code"), |
| 371 | })) |
| 372 | } |
| 373 | |
| 374 | fn installed_argument_value(name: &str) -> anyhow::Result<Option<String>> { |
| 375 | Ok(installed_arguments()? |
no test coverage detected