Skip to content

Commit d86c83e

Browse files
havoronDustinCampbell
authored andcommitted
Use /etc/os-release to determine linux distro #204
When determine linux distribution use the new configuration file /etc/os-release instead of per-distribution release files /etc/*-release. The majority of the big distributions adopted /etc/os-release.
1 parent 653252a commit d86c83e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function getSupportedPlatform() {
2626
}
2727
else if (process.platform === 'linux') {
2828
// Get the text of /etc/*-release to discover which Linux distribution we're running on.
29-
let release = child_process.execSync('cat /etc/*-release').toString().toLowerCase();
29+
let release = child_process.execSync('cat /etc/os-release').toString().toLowerCase();
3030

3131
if (release.indexOf('ubuntu') >= 0) {
3232
return SupportedPlatform.Ubuntu;
@@ -43,4 +43,4 @@ export function getSupportedPlatform() {
4343
}
4444

4545
return SupportedPlatform.None;
46-
}
46+
}

0 commit comments

Comments
 (0)