From e8f22c076525c2fa55115349157f67085df287bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 13 Mar 2023 13:50:23 -0400 Subject: refactor(core): pass cwd explicitly to resolve_path (#18092) Towards landing #15454 --- core/examples/ts_module_loader.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'core/examples/ts_module_loader.rs') diff --git a/core/examples/ts_module_loader.rs b/core/examples/ts_module_loader.rs index b57b04493..289b43dc9 100644 --- a/core/examples/ts_module_loader.rs +++ b/core/examples/ts_module_loader.rs @@ -9,6 +9,7 @@ use std::rc::Rc; use anyhow::anyhow; use anyhow::bail; +use anyhow::Context; use anyhow::Error; use deno_ast::MediaType; use deno_ast::ParseParams; @@ -106,7 +107,10 @@ fn main() -> Result<(), Error> { ..Default::default() }); - let main_module = resolve_path(main_url)?; + let main_module = resolve_path( + main_url, + &std::env::current_dir().context("Unable to get CWD")?, + )?; let future = async move { let mod_id = js_runtime.load_main_module(&main_module, None).await?; -- cgit v1.2.3