Skip to content

Commit

Permalink
Fix tonic_build OSS build
Browse files Browse the repository at this point in the history
Reviewed By: capickett

Differential Revision: D44324686

fbshipit-source-id: 930a442bed79bcee3f17cd7e984963fa78ea27c4
  • Loading branch information
zertosh authored and facebook-github-bot committed Mar 23, 2023
1 parent 28cf26d commit d4eba22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion protocol-rpc/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
"pjc.proto",
"suidcreate.proto",
];
let out_env = if cfg!(fbcode_build) { "OUT" } else { "OUT_DIR" };
let out_dir = std::env::var_os(out_env).unwrap_or_else(|| panic!("env `{out_env}` not set"));

tonic_build::configure()
.out_dir(std::env::var("OUT").unwrap())
.out_dir(&out_dir)
.compile(
proto_files,
// HACK: we need '.' directory for build with Buck
Expand Down

0 comments on commit d4eba22

Please sign in to comment.