chore: support Pop!_OS 22.04 versioning (#14859)

Co-authored-by: Elias Sorensen <elias.soerensen@usercentrics.com>
This commit is contained in:
Elias Sørensen 2022-06-21 12:02:48 +02:00 committed by GitHub
parent 0f8114f6a8
commit 6ca18b3bb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,6 +81,10 @@ function parseUbuntuVersion(osReleaseText: string): string {
if (fields.get('distrib_id') && fields.get('distrib_id')?.toLowerCase() === 'ubuntu')
return fields.get('distrib_release') || '';
// For Pop!_OS
if (fields.get('id') && fields.get('id')?.toLowerCase() === 'pop')
return fields.get('version_id') || '';
if (!fields.get('name') || fields.get('name')?.toLowerCase() !== 'ubuntu')
return '';
return fields.get('version_id') || '';