mirror of
https://github.com/actions/setup-python.git
synced 2025-04-24 07:22:14 +00:00
Trying to read file
This commit is contained in:
parent
82c7e631bb
commit
97f94fd3de
1 changed files with 2 additions and 4 deletions
|
@ -167,11 +167,9 @@ async function getMacOSInfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getLinuxInfo() {
|
export async function getLinuxInfo() {
|
||||||
const {stdout} = await exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], {
|
const pyprojectFile = fs.readFileSync('/etc/os-release').toString();
|
||||||
silent: true
|
|
||||||
});
|
|
||||||
|
|
||||||
const [osName, osVersion] = stdout.trim().split('\n');
|
const [osName, osVersion] = pyprojectFile.match(/ID="?(.+)"?/gm);
|
||||||
|
|
||||||
core.debug(`OS Name: ${osName}, Version: ${osVersion}`);
|
core.debug(`OS Name: ${osName}, Version: ${osVersion}`);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue