Browse Source

Fix: set working dir using the root dir

tags/v0.0.0-test.4
Philipp Oppermann 3 years ago
parent
commit
859992d24e
Failed to extract signature
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      examples/c-dataflow/run.rs

+ 2
- 2
examples/c-dataflow/run.rs View File

@@ -3,12 +3,12 @@ use std::path::Path;

#[tokio::main]
async fn main() -> eyre::Result<()> {
std::env::set_current_dir(Path::new(file!()).parent().unwrap())
let root = Path::new(env!("CARGO_MANIFEST_DIR"));
std::env::set_current_dir(root.join(file!()).parent().unwrap())
.wrap_err("failed to set working dir")?;

tokio::fs::create_dir_all("build").await?;

let root = Path::new(env!("CARGO_MANIFEST_DIR"));
build_package("dora-runtime").await?;
build_package("dora-node-api-c").await?;
build_c_node(root, "node.c", "c_node").await?;


Loading…
Cancel
Save