mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-19 13:03:44 +00:00
local run UI (#663)
## Summary of the Pull Request This PR add a UI to the local run. - The UI currently monitors the logs and some of the directory created (the rest will be wired in a coming PR) - pressing 'q' will quit the PR - By default, the job directory is deleted when the ui quits unless the parameter 'keep_job_dir' is specified
This commit is contained in:
@ -1,14 +1,17 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
use std::fs::File;
|
||||
use std::io::prelude::*;
|
||||
use std::process::Command;
|
||||
use std::{env, process::Stdio};
|
||||
|
||||
fn run_cmd(args: &[&str]) -> Result<String, Box<dyn Error>> {
|
||||
let cmd = Command::new(args[0]).args(&args[1..]).output()?;
|
||||
let cmd = Command::new(args[0])
|
||||
.args(&args[1..])
|
||||
.stdin(Stdio::null())
|
||||
.output()?;
|
||||
if cmd.status.success() {
|
||||
Ok(String::from_utf8_lossy(&cmd.stdout).trim().to_string())
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user