summaryrefslogtreecommitdiff
path: root/core/examples/ts_module_loader.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-03-13 13:50:23 -0400
committerGitHub <noreply@github.com>2023-03-13 18:50:23 +0100
commite8f22c076525c2fa55115349157f67085df287bf (patch)
treedf4105ee11bd69a4de1a138a26d6b44bca131ea1 /core/examples/ts_module_loader.rs
parent4c2aeb250241fff5084cf31747ab53f4a0ecad79 (diff)
refactor(core): pass cwd explicitly to resolve_path (#18092)
Towards landing #15454
Diffstat (limited to 'core/examples/ts_module_loader.rs')
-rw-r--r--core/examples/ts_module_loader.rs6
1 files changed, 5 insertions, 1 deletions
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?;