tangled
alpha
login
or
join now
althaea.zone
/
wire
2
fork
atom
ALPHA: wire is a tool to deploy nixos systems
wire.althaea.zone/
2
fork
atom
overview
issues
pulls
pipelines
show original command in command errors
marshmallow
5 months ago
aed25b23
3787830a
+6
-6
2 changed files
expand all
collapse all
unified
split
wire
lib
src
commands
interactive.rs
noninteractive.rs
+3
-3
wire/lib/src/commands/interactive.rs
···
55
55
stderr_collection: Arc<Mutex<VecDeque<String>>>,
56
56
stdout_collection: Arc<Mutex<VecDeque<String>>>,
57
57
58
58
-
command_string: String,
58
58
+
original_command: String,
59
59
60
60
completion_status: Arc<CompletionStatus>,
61
61
stdout_handle: JoinHandle<Result<(), CommandError>>,
···
269
269
write_stdin_pipe_w,
270
270
stderr_collection,
271
271
stdout_collection,
272
272
-
command_string: command_string.clone(),
272
272
+
original_command: arguments.command_string.as_ref().to_string(),
273
273
completion_status,
274
274
stdout_handle,
275
275
})
···
339
339
let logs = collection.make_contiguous().join("\n");
340
340
341
341
Err(CommandError::CommandFailed {
342
342
-
command_ran: self.command_string,
342
342
+
command_ran: self.original_command,
343
343
logs,
344
344
code: format!("code {}", exit_status.exit_code()),
345
345
reason: match success {
+3
-3
wire/lib/src/commands/noninteractive.rs
···
35
35
stdout_collection: Arc<Mutex<VecDeque<String>>>,
36
36
child: Child,
37
37
joinset: JoinSet<()>,
38
38
-
command_string: String,
38
38
+
original_command: String,
39
39
stdin: ChildStdin,
40
40
}
41
41
···
132
132
stdout_collection,
133
133
child,
134
134
joinset,
135
135
-
command_string,
135
135
+
original_command: arguments.command_string.as_ref().to_string(),
136
136
stdin,
137
137
})
138
138
}
···
154
154
.join("\n");
155
155
156
156
return Err(CommandError::CommandFailed {
157
157
-
command_ran: self.command_string,
157
157
+
command_ran: self.original_command,
158
158
logs,
159
159
code: match status.code() {
160
160
Some(code) => format!("code {code}"),