Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ifc24f3945763d75c58450e62b5ec701e6a6a6964
This commit is contained in:
parent
790ea414c3
commit
91e5063bc8
1 changed files with 5 additions and 2 deletions
|
|
@ -21,6 +21,9 @@ impl LogInterceptor for StdIoInterceptor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Default buffer size for reading command output
|
||||||
|
const DEFAULT_BUFFER_SIZE: usize = 4096;
|
||||||
|
|
||||||
/// Builder and executor for Nix commands.
|
/// Builder and executor for Nix commands.
|
||||||
pub struct NixCommand {
|
pub struct NixCommand {
|
||||||
subcommand: String,
|
subcommand: String,
|
||||||
|
|
@ -119,8 +122,8 @@ impl NixCommand {
|
||||||
let mut stdout = child_stdout;
|
let mut stdout = child_stdout;
|
||||||
let mut stderr = child_stderr;
|
let mut stderr = child_stderr;
|
||||||
|
|
||||||
let mut out_buf = [0u8; 4096];
|
let mut out_buf = [0u8; DEFAULT_BUFFER_SIZE];
|
||||||
let mut err_buf = [0u8; 4096];
|
let mut err_buf = [0u8; DEFAULT_BUFFER_SIZE];
|
||||||
|
|
||||||
let mut out_queue = VecDeque::new();
|
let mut out_queue = VecDeque::new();
|
||||||
let mut err_queue = VecDeque::new();
|
let mut err_queue = VecDeque::new();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue