1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

fix: panic during deno compile with no args (#9167)

This commit is contained in:
Luca Casonato 2021-01-19 16:19:36 +01:00 committed by GitHub
parent 0ef8c915c0
commit 4c223d0521
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -890,7 +890,7 @@ fn compile_subcommand<'a, 'b>() -> App<'a, 'b> {
runtime_args(SubCommand::with_name("compile"), true, false)
.setting(AppSettings::TrailingVarArg)
.arg(
script_arg(),
script_arg().required(true),
)
.arg(
Arg::with_name("output")

View file

@ -1248,6 +1248,7 @@ fn unwrap_or_exit<T>(result: Result<T, AnyError>) -> T {
let msg = format!(
"{}: {}",
colors::red_bold("error"),
// TODO(lucacasonato): print anyhow error chain here
error.to_string().trim()
);
eprintln!("{}", msg);