MCPcopy Create free account
hub / github.com/Qovery/engine / check_libs_directory

Function check_libs_directory

app/src/utils.rs:14–25  ·  view source on GitHub ↗
(path: String)

Source from the content-addressed store, hash-verified

12const LOCAL_DEPLOYED_ENGINE_VERSION: &str = "v0.0.0-local";
13
14pub fn check_libs_directory(path: String) -> Result<(), EngineInitError> {
15 match fs::read_dir(path) {
16 Ok(out) => {
17 let is_empty = out.take(1).count() == 0;
18 match is_empty {
19 true => Err(EngineInitError::Regular(ErrorKind::LibsDirEmpty)),
20 false => Ok(()),
21 }
22 }
23 Err(_) => Err(EngineInitError::Regular(ErrorKind::LibsPathsMissing)),
24 }
25}
26
27// check_versions_from will check (in file given in parameter) binaries versions
28// will assert an error if used version installed is not the same as written in file

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected