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
This commit is contained in:
Cre3per 2023-03-23 17:45:43 +01:00 committed by GitHub
parent 81c5ddf9f2
commit eb25e50edb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 58 additions and 4 deletions

View file

@ -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())