- Printf.printf "\e[0;31mSKIPPED\e[0m\n";
- flush stdout;
- Printf.eprintf "\e[0;31mContinue with next URI? [y/_]\e[0m";
- flush stderr;
- (match input_line stdin with
- "y" -> ()
- | _ -> raise Sys.Break)
+ let rec skip_break prompt =
+ try
+ if prompt then
+ begin
+ Printf.printf "\e[0;31mSKIPPED\e[0m\n";
+ flush stdout;
+ if not !timeout then
+ begin
+ Printf.eprintf "\e[0;31mContinue with next URI? [y/_]\e[0m";
+ flush stderr;
+ end;
+ end;
+ if not !timeout then
+ (match input_line stdin with
+ "y" -> ()
+ | _ -> raise Done)
+ else
+ timeout := false
+ with
+ Sys.Break -> skip_break false
+ in
+ skip_break true
+ | CicEnvironment.CircularDependency _ ->
+ Printf.printf "\e[0;31mCIRCULARDEP\e[0m\n"