This commit is contained in:
nora 2024-08-25 15:13:46 +02:00
parent b6d0675976
commit b0acf03502
22 changed files with 84 additions and 26 deletions

View file

@ -10,7 +10,7 @@ cluelessh-agent-client = { path = "../../lib/cluelessh-agent-client" }
cluelessh-tokio = { path = "../../lib/cluelessh-tokio" }
clap = { version = "4.5.15", features = ["derive"] }
eyre = "0.6.12"
eyre.workspace = true
rand = "0.8.5"
tokio = { version = "1.39.2", features = ["full"] }
tracing-subscriber = { version = "0.3.18", features = ["json", "env-filter"] }
@ -18,3 +18,6 @@ tracing-subscriber = { version = "0.3.18", features = ["json", "env-filter"] }
tracing.workspace = true
rpassword = "7.3.1"
users = "0.11.0"
[lints]
workspace = true

View file

@ -59,11 +59,10 @@ async fn main() -> eyre::Result<()> {
let destination = args.destination.clone();
Box::pin(async {
let result = tokio::task::spawn_blocking(move || {
let password = rpassword::prompt_password(format!(
rpassword::prompt_password(format!(
"{}@{}'s password: ",
username, destination
));
password
))
})
.await?;
result.wrap_err("failed to prompt password")