Skip to content

Commit

Permalink
Update cli/flox-rust-sdk/src/models/environment/managed_environment.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Kenigsberg <matthew@floxdev.com>
  • Loading branch information
ysndr and mkenigs committed Jan 23, 2024
1 parent d96a550 commit 10e2681
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,14 @@ impl ManagedEnvironment {
let project_branch = branch_name(&self.pointer, &self.path);
let sync_branch = remote_branch_name(&self.pointer);

// ensure the environment builds before we push it
// Ensure the environment builds before we push it
// Usually we don't create generations unless they build,
// but that is not always the case.
// If a user pulls an environment that is broken on their system, we may
// create a "broken" generation.
// That generation could have a divergent manifest and lock,
// or it could fail to build.
// So we have to verify we don't have a "broken" generation before pushing.
{
let mut env = self.get_current_generation(flox)?;
env.build(flox).map_err(ManagedEnvironmentError::Build)?;
Expand Down

0 comments on commit 10e2681

Please sign in to comment.