diff options
author | Kevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com> | 2020-02-09 02:19:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-09 11:19:05 +0100 |
commit | 506601841218fe34a744c8fce0f1011c716bdc73 (patch) | |
tree | 1b80e06ec5cd1385ea4aaabb060b83701d47b4bb /cli/lib.rs | |
parent | 1c0ffa138355c7eb90fd5d3c01f799245636bcc0 (diff) |
fmt: `deno fmt -` formats stdin and print to stdout (#3920)
Diffstat (limited to 'cli/lib.rs')
-rw-r--r-- | cli/lib.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/lib.rs b/cli/lib.rs index 945554434..4e100127b 100644 --- a/cli/lib.rs +++ b/cli/lib.rs @@ -405,7 +405,9 @@ async fn run_script(flags: DenoFlags, script: String) { } async fn fmt_command(files: Option<Vec<String>>, check: bool) { - fmt::format_files(files, check); + if let Err(err) = fmt::format_files(files, check) { + print_err_and_exit(err); + } } pub fn main() { |