[capturedb] don't fail on unparseable buck output

Summary:
Sometimes buck emits a timestamp, leading to a crash

> External Error: Failed to parse `buck targets --show-output ...` line of output:
> 2020-03-30 20:03:51

Reviewed By: dulmarod

Differential Revision: D20766438

fbshipit-source-id: 47cc00150
master
Nikos Gorogiannis 5 years ago committed by Facebook GitHub Bot
parent bacb2b3d6e
commit 7678143016

@ -109,8 +109,9 @@ let get_compilation_database_files_buck db_deps ~prog ~args =
| [_; filename] -> | [_; filename] ->
`Raw filename :: compilation_database_files `Raw filename :: compilation_database_files
| _ -> | _ ->
L.(die ExternalError) L.internal_error
"Failed to parse `buck targets --show-output ...` line of output:@\n%s" line "Failed to parse `buck targets --show-output ...` line of output:@\n%s" line ;
compilation_database_files
in in
List.fold ~f:scan_output ~init:[] lines List.fold ~f:scan_output ~init:[] lines
in in

Loading…
Cancel
Save