in crate_universe/src/main.rs [27:50]
fn main() -> anyhow::Result<()> {
env_logger::init();
let opt = Opt::from_args();
trace!("Parsing config from {:?}", opt.input_path);
let config: Config = {
let config_file = std::fs::File::open(&opt.input_path)
.with_context(|| format!("Failed to open config file at {:?}", opt.input_path))?;
serde_json::from_reader(config_file)
.with_context(|| format!("Failed to parse config file {:?}", opt.input_path))?
};
let lockfile = &opt.lockfile;
if opt.update_lockfile {
if lockfile.is_none() {
eprintln!("Not updating lockfile for `crate_universe` repository with name \"{}\" because it has no `lockfile` attribute.", opt.repo_name);
}
} else if let Some(lockfile) = lockfile {
return reuse_lockfile(config, lockfile, &opt);
}
generate_dependencies(config, &opt)
}