Skip to content

doctor: log process failures#176

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

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

Conversation

@dfabulich
Copy link
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
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
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.

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

Comments