diff options
author | Luca Casonato <lucacasonato@yahoo.com> | 2021-01-19 16:19:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-19 16:19:36 +0100 |
commit | 4c223d0521bf9711ccd4813a04ba7b1f7899485b (patch) | |
tree | d031a5932d67e7689cbf360973b33dfd6c9241ee | |
parent | 0ef8c915c07fa3e7c7898b467d259426144958f4 (diff) |
fix: panic during `deno compile` with no args (#9167)
-rw-r--r-- | cli/flags.rs | 2 | ||||
-rw-r--r-- | cli/main.rs | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/cli/flags.rs b/cli/flags.rs index 754ccec84..f018d00b0 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -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") diff --git a/cli/main.rs b/cli/main.rs index 519fc26c4..de0e63e84 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -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); |