mirror of https://github.com/aminya/setup-cpp
fix: install lsb_release if it is missing on ubuntu
This commit is contained in:
parent
22c47cf64e
commit
0fd405d4e1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,8 +1,13 @@
|
|||
import { getUbuntuVersion } from "ubuntu-version"
|
||||
import which from "which"
|
||||
import { setupAptPack } from "../setup/setupAptPack"
|
||||
import { isUbuntu } from "./isUbuntu"
|
||||
|
||||
export async function ubuntuVersion(): Promise<number[] | null> {
|
||||
if (isUbuntu()) {
|
||||
if (which.sync("lsb_release", { nothrow: true }) === null) {
|
||||
setupAptPack("lsb-release")
|
||||
}
|
||||
const versionSplitted = await getUbuntuVersion()
|
||||
|
||||
if (versionSplitted.length === 0) {
|
||||
|
|
Loading…
Reference in New Issue