Skip to content

Commit

Permalink
[buck2][clang] kill infer environment variables
Browse files Browse the repository at this point in the history
Summary: Infer's environment variables may contaminate buck2 infer capture rules ran locally. Remove them from the environment of the spawned buck2 command.

Reviewed By: martintrojer

Differential Revision: D51259178

fbshipit-source-id: 127c5bc446f6d380f7ea82fa1a94e60ada45ce7f
  • Loading branch information
ngorogiannis authored and facebook-github-bot committed Nov 14, 2023
1 parent c043822 commit a6e4216
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion infer/src/integration/Buck2Clang.ml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ let capture build_cmd =
in
let buck2_build_args = buck2_build_cmd @ capture_buck2_args build_report_file in
L.debug Capture Verbose "%s %s@." prog (List.to_string ~f:Fn.id buck2_build_args) ;
Buck.wrap_buck_call ~extend_env:[] V2 ~label:"build" (prog :: buck2_build_args) |> ignore ;
Buck.wrap_buck_call ~kill_infer_env_vars:true V2 ~label:"build" (prog :: buck2_build_args)
|> ignore ;
let infer_deps_lines =
BuckBuildReport.parse_infer_deps ~root:Config.buck2_root ~build_report_file
in
Expand Down

0 comments on commit a6e4216

Please sign in to comment.