Skip to content

Commit

Permalink
fix(stremio-core-protobuf): build.rs - use CARGO_MANIFEST_DIR for pro…
Browse files Browse the repository at this point in the history
…tobuf files location

Signed-off-by: Lachezar Lechev <[email protected]>
  • Loading branch information
elpiel committed Aug 2, 2024
1 parent 7264ed9 commit 641a7da
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions stremio-core-protobuf/build.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
use std::path::PathBuf;

use glob::glob;
use prost_build::Config;

pub const CARGO_MANIFEST_DIR: &str = env!("CARGO_MANIFEST_DIR");
fn main() {
let proto_dir = "proto";
let proto_paths = glob(format!("{proto_dir}/**/*.proto").as_str())

let proto_dir = PathBuf::from(CARGO_MANIFEST_DIR).join("proto");

let proto_paths = glob(format!("{}/**/*.proto", proto_dir.display()).as_str())
.unwrap()
.filter_map(|result| {
if let Err(err) = &result {
Expand Down

0 comments on commit 641a7da

Please sign in to comment.