summaryrefslogtreecommitdiff
path: root/cli/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/lib.rs')
-rw-r--r--cli/lib.rs4
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() {