summaryrefslogtreecommitdiff
path: root/cli/tools/repl/mod.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-03-13 19:31:03 -0400
committerGitHub <noreply@github.com>2023-03-13 19:31:03 -0400
commitc4771356f27b250e7fdbcede0de5682982720455 (patch)
tree1d3507a0b9ee7c6388b3dae8c752328c2528fe74 /cli/tools/repl/mod.rs
parenta35c8e6588fec21586bcb19146cad19fa01f4f23 (diff)
refactor: Remove call sites of "deno_core::resolve_url_or_path" (#18169)
These call sites didn't need to use "resolve_url_or_path". Towards landing https://github.com/denoland/deno/pull/15454
Diffstat (limited to 'cli/tools/repl/mod.rs')
-rw-r--r--cli/tools/repl/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/tools/repl/mod.rs b/cli/tools/repl/mod.rs
index a9cb0132b..99dab6261 100644
--- a/cli/tools/repl/mod.rs
+++ b/cli/tools/repl/mod.rs
@@ -5,8 +5,9 @@ use crate::args::ReplFlags;
use crate::colors;
use crate::proc_state::ProcState;
use crate::worker::create_main_worker;
+use deno_core::anyhow::Context;
use deno_core::error::AnyError;
-use deno_core::resolve_url_or_path;
+use deno_core::resolve_path;
use deno_runtime::permissions::Permissions;
use deno_runtime::permissions::PermissionsContainer;
use rustyline::error::ReadlineError;
@@ -80,7 +81,8 @@ async fn read_eval_file(
}
pub async fn run(flags: Flags, repl_flags: ReplFlags) -> Result<i32, AnyError> {
- let main_module = resolve_url_or_path("./$deno$repl.ts").unwrap();
+ let cwd = std::env::current_dir().context("Unable to get CWD")?;
+ let main_module = resolve_path("./$deno$repl.ts", &cwd).unwrap();
let ps = ProcState::build(flags).await?;
let mut worker = create_main_worker(
&ps,