Skip to content

Commit

Permalink
force run cargo update in the project manager before running a project
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDIMAS committed Jan 6, 2025
1 parent 54b5338 commit 3c443e6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions project-manager/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,17 @@ impl ProjectManager {
build_profile: &BuildProfile,
ui: &mut UserInterface,
) {
let mut build_profile = build_profile.clone();
// Force run `cargo update` before running the project to prevent various issues with
// dependency versions incompatibility.
build_profile.build_commands.insert(
0,
CommandDescriptor {
command: "cargo".to_string(),
args: vec!["update".to_string()],
environment_variables: vec![],
},
);
self.run_selected_project_command(name, build_profile.build_and_run_queue(), ui);
}

Expand Down

0 comments on commit 3c443e6

Please sign in to comment.