Permalink
Browse files

[switch] reload the installed package state after installing conf-ocaml

This should fix #35
  • Loading branch information...
1 parent 0b779a3 commit 3b8ea2546ffa5bbeac4abc5ea0bbb0608a44faa9 @samoht samoht committed Jul 7, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/client.ml
View
4 src/client.ml
@@ -388,11 +388,13 @@ let init_ocaml alias ocaml_version =
log "init_ocaml %s %s" (Alias.to_string alias) (OCaml_V.to_string ocaml_version);
let t = load_state () in
let alias_p = Path.C.create alias in
+ let aliases = t.aliases in
if not (Dirname.exists (Path.C.root alias_p)) then begin
Dirname.mkdir (Path.C.root alias_p);
add_alias t alias ocaml_version;
+ let t = load_state () in
if ocaml_version = OCaml_V.of_string Globals.default_compiler_version then begin
@@ -450,7 +452,7 @@ let init_ocaml alias ocaml_version =
with e ->
if not !Globals.debug then
Dirname.rmdir (Path.C.root alias_p);
- File.Aliases.write (Path.G.aliases t.global) t.aliases;
+ File.Aliases.write (Path.G.aliases t.global) aliases;
raise e
end

0 comments on commit 3b8ea25

Please sign in to comment.