mirror of
https://github.com/containers/youki
synced 2024-11-23 09:21:57 +01:00
refactore
This commit is contained in:
parent
b56ddc3b59
commit
6b5d59d751
@ -1,14 +1,16 @@
|
|||||||
use std::env;
|
use std::env;
|
||||||
use std::process::{Command, Stdio};
|
use std::process::{Command, Stdio};
|
||||||
|
use std::path::PathBuf;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn main() {
|
fn main() {
|
||||||
let path_result = env::current_dir();
|
let current_dir_path_result = env::current_dir();
|
||||||
let path = match path_result {
|
let current_dir_path = match current_dir_path_result {
|
||||||
Ok(path) => path.display().to_string(),
|
Ok(path_buf) => path_buf,
|
||||||
Err(_) => panic!("Path is not found"),
|
Err(_) => panic!("directory is not found"),
|
||||||
};
|
};
|
||||||
let status = Command::new(path + "/target/x86_64-unknown-linux-gnu/debug/youki")
|
let youki_path = current_dir_path.join(PathBuf::from("youki"));
|
||||||
|
let status = Command::new(youki_path)
|
||||||
.stdout(Stdio::null())
|
.stdout(Stdio::null())
|
||||||
.arg("-h")
|
.arg("-h")
|
||||||
.status()
|
.status()
|
||||||
|
Loading…
Reference in New Issue
Block a user