ALPHA: wire is a tool to deploy nixos systems wire.althaea.zone/
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

[autofix.ci] apply automated fixes

authored by

autofix-ci[bot] and committed by
marshmallow
26882b0d 89fd3d97

+21 -16
+1 -4
wire/lib/src/commands/common.rs
··· 8 8 9 9 use crate::{ 10 10 EvalGoal, SubCommandModifiers, 11 - commands::{ 12 - CommandArguments, Either, WireCommandChip, run_command, 13 - run_command_with_env, 14 - }, 11 + commands::{CommandArguments, Either, WireCommandChip, run_command, run_command_with_env}, 15 12 errors::HiveLibError, 16 13 hive::{ 17 14 HiveLocation,
+2 -2
wire/lib/src/commands/interactive.rs
··· 69 69 stdout_collection: Arc<Mutex<VecDeque<String>>>, 70 70 completion_status: Arc<CompletionStatus>, 71 71 span: Span, 72 - log_stdout: bool 72 + log_stdout: bool, 73 73 } 74 74 75 75 /// the underlying command began ··· 155 155 stdout_collection: stdout_collection.clone(), 156 156 completion_status: completion_status.clone(), 157 157 span: Span::current(), 158 - log_stdout: arguments.log_stdout 158 + log_stdout: arguments.log_stdout, 159 159 }; 160 160 161 161 std::thread::spawn(move || dynamic_watch_sudo_stdout(arguments))
+1 -1
wire/lib/src/commands/mod.rs
··· 45 45 keep_stdin_open: bool, 46 46 elevated: bool, 47 47 clobber_lock: Arc<Mutex<()>>, 48 - log_stdout: bool 48 + log_stdout: bool, 49 49 } 50 50 51 51 impl<'a, S: AsRef<str>> CommandArguments<'a, S> {
+3 -3
wire/lib/src/commands/noninteractive.rs
··· 94 94 output_mode.clone(), 95 95 error_collection.clone(), 96 96 true, 97 - true 97 + true, 98 98 )); 99 99 joinset.spawn(handle_io( 100 100 stdout_handle, 101 101 output_mode.clone(), 102 102 stdout_collection.clone(), 103 103 false, 104 - arguments.log_stdout 104 + arguments.log_stdout, 105 105 )); 106 106 107 107 Ok(NonInteractiveChildChip { ··· 158 158 output_mode: Arc<ChildOutputMode>, 159 159 collection: Arc<Mutex<VecDeque<String>>>, 160 160 is_error: bool, 161 - should_log: bool 161 + should_log: bool, 162 162 ) where 163 163 R: tokio::io::AsyncRead + Unpin, 164 164 {
+3 -1
wire/lib/src/hive/node.rs
··· 205 205 self.target.user, host 206 206 ); 207 207 let output = run_command_with_env( 208 - &CommandArguments::new(command_string, modifiers, clobber_lock).nix().log_stdout(), 208 + &CommandArguments::new(command_string, modifiers, clobber_lock) 209 + .nix() 210 + .log_stdout(), 209 211 HashMap::from([("NIX_SSHOPTS".into(), self.target.create_ssh_opts(modifiers))]), 210 212 )?; 211 213
+4 -2
wire/lib/src/hive/steps/activate.rs
··· 114 114 Some(&ctx.node.target) 115 115 }, 116 116 ) 117 - .elevated().log_stdout(), 117 + .elevated() 118 + .log_stdout(), 118 119 )?; 119 120 120 121 let result = child.wait_till_success().await; ··· 134 135 warn!("Rebooting {name}!", name = ctx.name); 135 136 136 137 let reboot = run_command( 137 - &CommandArguments::new("reboot now", ctx.modifiers, ctx.clobber_lock.clone()).log_stdout() 138 + &CommandArguments::new("reboot now", ctx.modifiers, ctx.clobber_lock.clone()) 139 + .log_stdout() 138 140 .on_target(Some(&ctx.node.target)) 139 141 .elevated(), 140 142 )?;
+5 -2
wire/lib/src/hive/steps/build.rs
··· 35 35 ); 36 36 37 37 let status = run_command_with_env( 38 - &CommandArguments::new(command_string, ctx.modifiers, ctx.clobber_lock.clone()).on_target(if ctx.node.build_remotely { 38 + &CommandArguments::new(command_string, ctx.modifiers, ctx.clobber_lock.clone()) 39 + .on_target(if ctx.node.build_remotely { 39 40 Some(&ctx.node.target) 40 41 } else { 41 42 None 42 - }).nix().log_stdout(), 43 + }) 44 + .nix() 45 + .log_stdout(), 43 46 std::collections::HashMap::new(), 44 47 )? 45 48 .wait_till_success()
+2 -1
wire/lib/src/hive/steps/keys.rs
··· 246 246 }, 247 247 ) 248 248 .elevated() 249 - .keep_stdin_open().log_stdout(), 249 + .keep_stdin_open() 250 + .log_stdout(), 250 251 )?; 251 252 252 253 let mut writer = SimpleLengthDelimWriter::new(async |data| child.write_stdin(data).await);