Skip to content

Commit 1912d56

Browse files
committed
run-make-support: improve docs for assert_exit_code
1 parent 7786f7f commit 1912d56

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: src/tools/run-make-support/src/command.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,15 @@ impl CompletedProcess {
388388
self
389389
}
390390

391+
/// Check the **exit status** of the process. On Unix, this is *not* the **wait status**.
392+
///
393+
/// See [`std::process::ExitStatus::code`]. This is not to be confused with
394+
/// [`std::process::ExitCode`].
391395
#[track_caller]
392396
pub fn assert_exit_code(&self, code: i32) -> &Self {
393-
assert!(self.output.status.code() == Some(code));
397+
// FIXME(jieyouxu): this should really be named `exit_status`, because std has an `ExitCode`
398+
// that means a different thing.
399+
assert_eq!(self.output.status.code(), Some(code));
394400
self
395401
}
396402
}

0 commit comments

Comments
 (0)