Skip to content

doctor: log process failures#176

Closed
dfabulich wants to merge 1 commit intoskiptools:mainfrom
dfabulich:doctor-log-process-failures
Closed

doctor: log process failures#176
dfabulich wants to merge 1 commit intoskiptools:mainfrom
dfabulich:doctor-log-process-failures

Conversation

@dfabulich
Copy link
Copy Markdown
Contributor

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device

@cla-bot cla-bot Bot added the cla-signed label Feb 3, 2026

func parseVersion(_ result: Result<ProcessOutput, Error>?) -> (result: Result<ProcessOutput, Error>?, message: MessageBlock?) {
if let result = result, case .failure(let error) = result {
self.outputOptions.logMessage("\(title): \(error)")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the benefit of logging the message in addition to returning the failed result along with the MessageBlock with the failure details? We generally prefer to include all the relevant data in the MessageBlock so it can be accessed through the skip doctor --json output by a (theoretical) tool that might be running the command.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm open minded as to exactly how to fix it, but, today, if skip doctor tries to run a command that simply doesn't exist, nothing shows up in the log at all.

@dfabulich
Copy link
Copy Markdown
Contributor Author

I can't repro the issue I was trying to fix here; we have a separate code path for ADB, the one most likely to blow up here.

@dfabulich dfabulich closed this Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants