mirror of
https://github.com/house-of-vanity/rexec.git
synced 2025-07-07 00:54:06 +00:00
Fix some error handling
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1043,7 +1043,7 @@ checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78"
|
||||
|
||||
[[package]]
|
||||
name = "rexec"
|
||||
version = "1.0.3"
|
||||
version = "1.0.4"
|
||||
dependencies = [
|
||||
"brace-expand",
|
||||
"clap 4.3.4",
|
||||
|
@ -24,13 +24,13 @@ struct Args {
|
||||
#[arg(short, long, default_value_t = whoami::username())]
|
||||
username: String,
|
||||
|
||||
#[arg(short, long, help = "Use known_hosts to build servers list")]
|
||||
#[arg(short, long, help = "Use known_hosts to build servers list instead of string expansion.")]
|
||||
known_hosts: bool,
|
||||
|
||||
#[arg(
|
||||
short,
|
||||
long,
|
||||
help = "Expression to build server list. List and range expansion available. Example: 'web-[1:12]-io-{prod,dev}'"
|
||||
help = "Expression to build server list. List and range expansion are supported. Example: 'web-[1:12]-io-{prod,dev}'"
|
||||
)]
|
||||
expression: String,
|
||||
|
||||
@ -171,6 +171,10 @@ fn main() {
|
||||
// Build MasshHostConfig hostnames list
|
||||
let mut massh_hosts: Vec<MasshHostConfig> = vec![];
|
||||
let mut hosts_and_ips: HashMap<IpAddr, String> = HashMap::new();
|
||||
if args.parallel != 100 {
|
||||
warn!("Parallelism: {} thread{}", &args.parallel, {if args.parallel != 1 {"s."} else {"."}});
|
||||
}
|
||||
|
||||
info!("Matched hosts:");
|
||||
for host in matched_hosts.iter() {
|
||||
let ip = match lookup_host(&host.name) {
|
||||
|
Reference in New Issue
Block a user