Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
Signed-off-by: Muriel Paraire <[email protected]>
  • Loading branch information
MurielParaire committed May 3, 2024
1 parent 16fae1d commit 4aa0d36
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/vmm/src/grpc/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,25 +116,19 @@ impl VmmService {
) -> std::result::Result<PathBuf, VmmErrors> {
// define file path
let mut entire_path = curr_dir.to_os_string();
entire_path.push(&end_path);
entire_path.push(end_path);

// Check if the file is on the system, else build it
let exists = Path::new(&entire_path)
.try_exists()
.map_err(VmmErrors::VmmBuildEnvironment)?;

if !exists {
info!(
"File {:?} not found, building it",
&entire_path
);
info!("File {:?} not found, building it", &entire_path);
let _ = self
.run_command(command_type, args)
.map_err(VmmErrors::VmmBuildEnvironment);
info!(
"File {:?} successfully build",
&entire_path
);
info!("File {:?} successfully build", &entire_path);
};
Ok(PathBuf::from(&entire_path))
}
Expand Down

0 comments on commit 4aa0d36

Please sign in to comment.