Skip to content
Snippets Groups Projects
Commit a3ff56ee authored by Andre Maroneze's avatar Andre Maroneze
Browse files

[Kernel] improve error message for invalid JCDB file

parent b45463ab
No related branches found
No related tags found
No related merge requests found
......@@ -242,6 +242,9 @@ let parse_entry jcdb_dir r =
let compute_flags_from_file () =
let database = Kernel.JsonCompilationDatabase.get () in
let jcdb_dir, jcdb_path =
if not (Sys.file_exists database) then
Kernel.abort "invalid path for option %s: %s"
Kernel.JsonCompilationDatabase.option_name database;
if Sys.is_directory database then
database, Filename.concat database "compile_commands.json"
else Filename.dirname database, database
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment