Skip to content

Commit 0fd405d

Browse files
committed
fix: install lsb_release if it is missing on ubuntu
1 parent 22c47cf commit 0fd405d

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

dist/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/setup_cpp.mjs.map

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/utils/env/ubuntu_version.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
import { getUbuntuVersion } from "ubuntu-version"
2+
import which from "which"
3+
import { setupAptPack } from "../setup/setupAptPack"
24
import { isUbuntu } from "./isUbuntu"
35

46
export async function ubuntuVersion(): Promise<number[] | null> {
57
if (isUbuntu()) {
8+
if (which.sync("lsb_release", { nothrow: true }) === null) {
9+
setupAptPack("lsb-release")
10+
}
611
const versionSplitted = await getUbuntuVersion()
712

813
if (versionSplitted.length === 0) {

0 commit comments

Comments
 (0)