From 74226d5a473256d72991a4b825f568dd3466d6ab Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 16 Mar 2022 18:13:12 -0400 Subject: [PATCH] fix: cargo publish fails without absolute paths --- cli/build.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/build.rs b/cli/build.rs index 7b56dbcbd05220..f6b1ae73ac13de 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -99,8 +99,9 @@ fn create_compiler_snapshot( ); op_crate_libs.insert("deno.net", "../ext/net/lib.deno_net.d.ts"); // ensure we invalidate the build properly. + let cli_dir = Path::new(env!("CARGO_MANIFEST_DIR")); for (name, path) in op_crate_libs.iter() { - let path = std::fs::canonicalize(path) + let path = std::fs::canonicalize(cli_dir.join(path)) .map_err(|e| format!("{}: {}", path, e)) .unwrap(); println!(