mirror of
https://github.com/actions/setup-python.git
synced 2026-01-21 05:38:54 +08:00
Remove console logs and debug version
This commit is contained in:
parent
f22ce50675
commit
6e46140c9c
3 changed files with 14 additions and 14 deletions
17
src/utils.ts
17
src/utils.ts
|
|
@ -122,18 +122,23 @@ export function isCacheFeatureAvailable(): boolean {
|
|||
}
|
||||
|
||||
export async function getLinuxOSReleaseInfo() {
|
||||
const versionId = await exec.getExecOutput('lsb_release', ['-a'], {
|
||||
silent: true
|
||||
});
|
||||
const {stdout, stderr, exitCode} = await exec.getExecOutput(
|
||||
'lsb_release',
|
||||
['-a'],
|
||||
{
|
||||
silent: true
|
||||
}
|
||||
);
|
||||
|
||||
let osVersion = '';
|
||||
let osRelease = '';
|
||||
|
||||
versionId.stdout.split('\n').forEach(elem => {
|
||||
stdout.split('\n').forEach(elem => {
|
||||
if (elem.includes('Distributor')) osVersion = elem.split(':')[1].trim();
|
||||
if (elem.includes('Release')) osRelease = elem.split(':')[1].trim();
|
||||
});
|
||||
|
||||
core.info(osRelease);
|
||||
core.info(osVersion);
|
||||
core.debug(`OS Release: ${osRelease}, Version: ${osVersion}`);
|
||||
|
||||
return `${osVersion}-${osRelease}`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue