Skip to content

Commit f33c2f8

Browse files
fix: use the correct abs path for proto and fbs (#3446)
Signed-off-by: Joe Isaacs <[email protected]>
1 parent 86d8b77 commit f33c2f8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

xtask/src/main.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::path::PathBuf;
2+
13
use clap::Parser;
24
use xshell::{Shell, cmd};
35

@@ -29,7 +31,7 @@ fn execute_generate_fbs() -> anyhow::Result<()> {
2931
];
3032

3133
// CD to vortex-flatbuffers project
32-
sh.change_dir(std::env::current_dir()?.join("vortex-flatbuffers"));
34+
sh.change_dir(PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../vortex-flatbuffers"));
3335

3436
cmd!(
3537
sh,
@@ -41,7 +43,7 @@ fn execute_generate_fbs() -> anyhow::Result<()> {
4143
}
4244

4345
fn execute_generate_proto() -> anyhow::Result<()> {
44-
let vortex_proto = std::env::current_dir()?.join("vortex-proto");
46+
let vortex_proto = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../vortex-proto");
4547
let proto_files = vec![
4648
vortex_proto.join("proto").join("dtype.proto"),
4749
vortex_proto.join("proto").join("scalar.proto"),

0 commit comments

Comments
 (0)