Remove the last bits of unknown_os in the code base (#9718)

* Remove the last bits of unknown_os in the code base

* Fmt
This commit is contained in:
Bastian Köcher
2021-09-09 11:17:16 +02:00
committed by GitHub
parent a443944167
commit 129c9ed09e
28 changed files with 197 additions and 523 deletions
@@ -76,13 +76,7 @@ impl KeystoreParams {
/// Returns a vector of remote-urls and the local Keystore configuration
pub fn keystore_config(&self, config_dir: &Path) -> Result<(Option<String>, KeystoreConfig)> {
let password = if self.password_interactive {
#[cfg(not(target_os = "unknown"))]
{
let password = input_keystore_password()?;
Some(SecretString::new(password))
}
#[cfg(target_os = "unknown")]
None
Some(SecretString::new(input_keystore_password()?))
} else if let Some(ref file) = self.password_filename {
let password = fs::read_to_string(file).map_err(|e| format!("{}", e))?;
Some(SecretString::new(password))
@@ -113,7 +107,6 @@ impl KeystoreParams {
}
}
#[cfg(not(target_os = "unknown"))]
fn input_keystore_password() -> Result<String> {
rpassword::read_password_from_tty(Some("Keystore password: "))
.map_err(|e| format!("{:?}", e).into())