Skip to content

linux: Fix checkLinuxSystemInfo detection#193

Closed
prgmitchell wants to merge 1 commit intoobsproject:masterfrom
prgmitchell:fixCheckLinuxSystemInfo
Closed

linux: Fix checkLinuxSystemInfo detection#193
prgmitchell wants to merge 1 commit intoobsproject:masterfrom
prgmitchell:fixCheckLinuxSystemInfo

Conversation

@prgmitchell
Copy link
Copy Markdown
Member

@prgmitchell prgmitchell commented Oct 29, 2025

Description

Add an early return when 'Distribution' and 'Flatpak Runtime' are not found.

Motivation and Context

The distribution check was triggering for Windows and macOS logs

How Has This Been Tested?

Windows log: https://obsproject.com/logs/fol11bBs0Ia9ZfcZ
image

Linux log: https://obsproject.com/logs/3G0ITqDVvenAhDbA
image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

Add an early return when 'Distribution' and 'Flatpak Runtime' are not found.
@RytoEX
Copy link
Copy Markdown
Member

RytoEX commented Oct 29, 2025

cc @mihawk90

@mihawk90
Copy link
Copy Markdown
Contributor

mihawk90 commented Oct 29, 2025

I'm not sure about this fix. I think we'd have to do this a little different since what this patch does is essentially what checkFlatpak() and checkDistro() do already.

However, this also means that both being false is essentially what this block is supposed to cover:

loganalyzer/checks/linux.py

Lines 187 to 190 in 79f7adf

else:
# I have never seen this, but you never know
linuxDistroOrFlatpak = 'Distribution: ⚠️ None'
linuxSystemInfoHelp = 'No distribution detected. This can lead to undefined behaviour. Please consult your distribution\'s support channels on how to fix this.<br>'

Which consequently would never be reached.

I think we'll have to check for Windows/Mac instead and return early.

I'll try whipping something up and opening an alternate PR and then we can decide.

edit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants