Merge pull request #38 from nix-community/fix-malformed-gens
lanzatool: ignore malformed generations
This commit is contained in:
commit
46df12d579
|
@ -36,10 +36,18 @@ impl Installer {
|
||||||
|
|
||||||
pub fn install(&self) -> Result<()> {
|
pub fn install(&self) -> Result<()> {
|
||||||
for toplevel in &self.generations {
|
for toplevel in &self.generations {
|
||||||
let generation = Generation::from_toplevel(toplevel).with_context(|| {
|
let generation_result = Generation::from_toplevel(toplevel).with_context(|| {
|
||||||
format!("Failed to build generation from toplevel: {toplevel:?}")
|
format!("Failed to build generation from toplevel: {toplevel:?}")
|
||||||
})?;
|
});
|
||||||
|
|
||||||
|
let generation = match generation_result {
|
||||||
|
Ok(generation) => generation,
|
||||||
|
Err(e) => {
|
||||||
|
println!("Malformed generation: {:?}", e);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
println!("Installing generation {generation}");
|
println!("Installing generation {generation}");
|
||||||
|
|
||||||
self.install_generation(&generation)
|
self.install_generation(&generation)
|
||||||
|
|
Loading…
Reference in New Issue