Skip to content

Commit

Permalink
[buck] Fix target parsing
Browse files Browse the repository at this point in the history
Summary: If there is a target `abc//:def` then it got parsed as "no name", causing it to become `abc//:def::def`.

Reviewed By: ngorogiannis

Differential Revision:
D59273851

Privacy Context Container: L1208441

fbshipit-source-id: e1165c3e3752b4e3e241896597bea2fb01107e51
  • Loading branch information
hajduakos authored and facebook-github-bot committed Jul 2, 2024
1 parent 50e9873 commit a883163
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion infer/src/integration/Buck.ml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ let parse_target_string =
else if Str.string_match normal_target_regexp s 0 then `NormalTarget s
else if Str.string_match noname_target_regexp s 0 then
let name = String.split s ~on:'/' |> List.last_exn in
`NormalTarget (F.sprintf "%s:%s" s name)
if Char.equal name.[0] ':' then `NormalTarget s else `NormalTarget (F.sprintf "%s:%s" s name)
else retry s
in
fun s ->
Expand Down

0 comments on commit a883163

Please sign in to comment.