Skip to content

Commit

Permalink
try separating mains
Browse files Browse the repository at this point in the history
  • Loading branch information
beltram committed Jun 13, 2023
1 parent 8499a53 commit 2c97fe5
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/build.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// otherwise fails while building Docker image
#[cfg(not(target_env = "musl"))]
fn main() -> Result<(), Box<dyn std::error::Error>> {
// otherwise fails while building Docker image
#[cfg(not(target_env = "musl"))]
{
for proto in std::fs::read_dir("tests/grpc/protos").unwrap() {
proto.map(|p| p.path()).ok().map(tonic_build::compile_protos).transpose()?;
}
for proto in std::fs::read_dir("tests/grpc/protos")? {
tonic_build::compile_protos(proto?.path())?;
}
Ok(())
}

#[cfg(target_env = "musl")]
fn main() -> Result<(), Box<dyn std::error::Error>> {}

0 comments on commit 2c97fe5

Please sign in to comment.