Skip to content

Commit

Permalink
Merge pull request ocaml#5056 from rjbou/init-config-fx
Browse files Browse the repository at this point in the history
Fix 'opam init' and 'opam init --reinit' when the `jobs` variable has been set in the opamrc or the current config
  • Loading branch information
rjbou committed Apr 22, 2022
1 parent 24073c1 commit 59572fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ New option/command/subcommand are prefixed with ◈.
*

## Init
*
* [BUG] Fix `opam init` and `opam init --reinit` when the `jobs` variable has been set in the opamrc or the current config. [#5056 @rjbou]

## Config report
*
Expand Down Expand Up @@ -121,3 +121,7 @@ New option/command/subcommand are prefixed with ◈.

## Security fixes
*

# API updates
## opam-client
* `OpamClient`: fix `update_with_init_config`, when ``jobs` was set in `init_config`, it dropped rest of `config` update [#5056 @rjbou]
4 changes: 2 additions & 2 deletions src/client/opamClient.ml
Original file line number Diff line number Diff line change
Expand Up @@ -752,9 +752,9 @@ let update_with_init_config ?(overwrite=false) config init_config =
else conf
in
config |>
match I.jobs init_config with
(match I.jobs init_config with
| Some j -> setifnew C.jobs C.with_jobs j
| None -> fun c -> c |>
| None -> fun c -> c) |>
setifnew C.dl_tool C.with_dl_tool_opt (I.dl_tool init_config) |>
setifnew C.dl_jobs C.with_dl_jobs
(OpamStd.Option.default OpamStateConfig.(default.dl_jobs)
Expand Down

0 comments on commit 59572fb

Please sign in to comment.