File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -118,14 +118,18 @@ let config_file_args =
118118 let fname, config_lines =
119119 let rev_dirs = List. rev @@ filename_parts @@ Stdlib.Sys. getcwd () in
120120 let rec find_up = function
121- | [] -> failwith " OCANNL could not find the ocannl_config file along current path"
121+ | [] ->
122+ Stdio. printf
123+ " \n Welcome to OCANNL! No ocannl_config file found along current path.\n %!" ;
124+ (" " , [] )
122125 | _ :: tl as rev_dirs -> (
123126 let fname = filename_of_parts (List. rev @@ (" ocannl_config" :: rev_dirs)) in
124127 try (fname, read fname) with Sys_error _ -> find_up tl)
125128 in
126129 find_up rev_dirs
127130 in
128- Stdio. printf " \n Welcome to OCANNL! Reading configuration defaults from %s.\n %!" fname;
131+ if String. length fname > 0 then
132+ Stdio. printf " \n Welcome to OCANNL! Reading configuration defaults from %s.\n %!" fname;
129133 config_lines
130134 |> List. filter ~f: (fun l ->
131135 not (String. is_prefix ~prefix: " ~~" l || String. is_prefix ~prefix: " #" l))
You can’t perform that action at this time.
0 commit comments