Check if qemu-img is present before startup
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
10
virtweb_backend/src/utils/exec_utils.rs
Normal file
10
virtweb_backend/src/utils/exec_utils.rs
Normal file
@ -0,0 +1,10 @@
|
||||
use std::path::Path;
|
||||
|
||||
/// Check the existence of a required program
|
||||
pub fn check_program(name: &str, description: &str) {
|
||||
let path = Path::new(name);
|
||||
|
||||
if !path.exists() {
|
||||
panic!("{name} does not exist! {description}");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user