Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/system/launchd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,9 @@ fn bootout_missing_error(error: &str) -> bool {
|| error.contains("could not find service")
|| error.contains("service is not loaded")
|| error.contains("not in domain")
// macOS (Darwin 27) returns EIO for `launchctl bootout` of a
// service that is not currently loaded, not "No such process".
|| error.contains("boot-out failed: 5")
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Outdated
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
}

#[cfg(test)]
Expand Down Expand Up @@ -712,8 +715,11 @@ mod tests {
assert!(bootout_missing_error(
"`launchctl bootout gui/501 foo` failed: Could not find specified service"
));
assert!(!bootout_missing_error(
assert!(bootout_missing_error(
"`launchctl bootout gui/501 foo` failed: Boot-out failed: 5: Input/output error"
));
assert!(!bootout_missing_error(
"`launchctl bootout gui/501 foo` failed: Boot-out failed: 1: Operation not permitted"
));
}
}