File tree 1 file changed +9
-6
lines changed
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,17 @@ let setRawRoots l = Prefs.set rawroots (Safelist.rev l)
45
45
46
46
let rawRoots () = Safelist. rev (Prefs. read rawroots)
47
47
48
+ let wrongNumRootsExn roots =
49
+ Util. Fatal (Printf. sprintf " Wrong number of roots: \
50
+ 2 expected, but %d provided (%s)\n (Maybe you specified \
51
+ roots both on the command line and in the profile?)"
52
+ (Safelist. length roots)
53
+ (String. concat " , " roots))
54
+
48
55
let rawRootPair () =
49
56
match rawRoots () with
50
57
[r1; r2] -> (r1, r2)
51
- | _ -> assert false
58
+ | roots -> raise (wrongNumRootsExn roots)
52
59
53
60
let theroots = ref []
54
61
@@ -58,11 +65,7 @@ open Lwt
58
65
let installRoots termInteract =
59
66
let () = uninstallRoots () in (* Clear out potential old roots *)
60
67
let roots = rawRoots () in
61
- if Safelist. length roots <> 2 then
62
- raise (Util. Fatal (Printf. sprintf
63
- " Wrong number of roots: 2 expected, but %d provided (%s)\n (Maybe you specified roots both on the command line and in the profile?)"
64
- (Safelist. length roots)
65
- (String. concat " , " roots) ));
68
+ if Safelist. length roots <> 2 then raise (wrongNumRootsExn roots);
66
69
Safelist. fold_right
67
70
(fun r cont ->
68
71
Remote. canonizeRoot r (Clroot. parseRoot r) termInteract
You can’t perform that action at this time.
0 commit comments