summaryrefslogtreecommitdiff
path: root/cli/args/mod.rs
diff options
context:
space:
mode:
authorCre3per <12541974+Cre3per@users.noreply.github.com>2023-03-23 17:45:43 +0100
committerGitHub <noreply@github.com>2023-03-23 12:45:43 -0400
commiteb25e50edb8efe6fe8fa973199dccfccf22575c7 (patch)
treeb6c56405b106c6bca0742da37e81e29da6ec8fcd /cli/args/mod.rs
parent81c5ddf9f2cec291be9b7e31e9d8c430585a7519 (diff)
fix(cli): restore `deno run -` to handle stdin as typescript (#18391)
Bug reported here shortly after merging `--ext` changes https://github.com/denoland/deno/pull/17172#issuecomment-1480898098 Also found a missing `--check` in integration tests for `--ext` that would have missed a bug if there was one. Fixes #18392
Diffstat (limited to 'cli/args/mod.rs')
-rw-r--r--cli/args/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs
index fb44c0a8f..338637455 100644
--- a/cli/args/mod.rs
+++ b/cli/args/mod.rs
@@ -696,7 +696,8 @@ impl CliOptions {
std::env::current_dir()
.context("Unable to get CWD")
.and_then(|cwd| {
- resolve_url_or_path("./$deno$stdin", &cwd).map_err(AnyError::from)
+ resolve_url_or_path("./$deno$stdin.ts", &cwd)
+ .map_err(AnyError::from)
})
} else if self.flags.watch.is_some() {
resolve_url_or_path(&run_flags.script, self.initial_cwd())