Skip to content

Commit

Permalink
Support yes option for opam upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Mylloon committed Oct 9, 2023
1 parent 1f6baef commit 05dad14
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/steps/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,13 @@ pub fn run_opam_update(ctx: &ExecutionContext) -> Result<()> {
print_separator("OCaml Package Manager");

ctx.run_type().execute(&opam).arg("update").status_checked()?;
ctx.run_type().execute(&opam).arg("upgrade").status_checked()?;

let mut command = ctx.run_type().execute(&opam);
command.args(["upgrade"]);
if ctx.config().yes(Step::Opam) {
command.arg("--yes");
}
command.status_checked()?;

if ctx.config().cleanup() {
ctx.run_type().execute(&opam).arg("clean").status_checked()?;
Expand Down

0 comments on commit 05dad14

Please sign in to comment.