Skip to content

Commit ce44f4a

Browse files
rchen152meta-codesync[bot]
authored andcommitted
Stop swallowing the exit status in InitArgs::run_check
Summary: The only caller of run_check returns success regardless of the run_check status, so there's no need for run_check to discard its status: https://github.com/facebook/pyrefly/blob/785a8effd660a36e08078df8e426a71e1feafb60/pyrefly/lib/commands/init.rs#L78. Reviewed By: kinto0 Differential Revision: D89905963 fbshipit-source-id: 0fa5b726b0c63050ff3fc2c210bbfe98ce1f09f9
1 parent b5d4c38 commit ce44f4a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

pyrefly/lib/commands/init.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,11 @@ impl InitArgs {
107107
FilesArgs::get(Vec::new(), config_path, ConfigOverrideArgs::default())?;
108108

109109
// Run the check directly
110-
match check_args.run_once(filtered_globs, config_finder) {
111-
Ok((status, errors)) => Ok((status, errors)),
112-
Err(e) => {
113-
error!("Failed to run pyrefly check: {}", e);
114-
Ok((CommandExitStatus::Success, Vec::new())) // Still return success to match original behavior
115-
}
110+
let res = check_args.run_once(filtered_globs, config_finder);
111+
if let Err(e) = &res {
112+
error!("Failed to run pyrefly check: {}", e);
116113
}
114+
res
117115
}
118116

119117
fn prompt_error_suppression(

0 commit comments

Comments
 (0)