MCPcopy Create free account
hub / github.com/FuzzAnything/PromptFuzz / parse_config

Function parse_config

src/config.rs:128–144  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126 })
127}
128pub fn parse_config() -> eyre::Result<()> {
129 let config = Config::parse();
130 CONFIG_INSTANCE.set(RwLock::new(config)).unwrap();
131 let deopt = Deopt::new(get_library_name())?;
132 let data = deopt.get_library_data_dir()?;
133 if !data.exists() {
134 eyre::bail!(
135 "Cannot find the entry {} in `data` dir, please prepare it in anvance.",
136 deopt.config.project_name
137 );
138 }
139 let lib = deopt.get_library_build_lib_path()?;
140 if !lib.exists() {
141 eyre::bail!("Cannot find the build library {} in `{}` dir, please build it by build.sh in anvance.", deopt.config.project_name, Deopt::get_crate_build_dir()?.display());
142 }
143 Ok(())
144}
145
146/// Simple program to greet a person
147#[derive(Parser, Debug)]

Callers 1

mainFunction · 0.85

Calls 3

get_library_nameFunction · 0.85
get_library_data_dirMethod · 0.80

Tested by

no test coverage detected