mirror of
https://github.com/actions/setup-python.git
synced 2025-07-02 23:53:47 +00:00
Update exec command, remove mock from unit tests
This commit is contained in:
parent
6e46140c9c
commit
96d176662d
3 changed files with 4 additions and 23 deletions
10
src/utils.ts
10
src/utils.ts
|
@ -124,19 +124,13 @@ export function isCacheFeatureAvailable(): boolean {
|
|||
export async function getLinuxOSReleaseInfo() {
|
||||
const {stdout, stderr, exitCode} = await exec.getExecOutput(
|
||||
'lsb_release',
|
||||
['-a'],
|
||||
['-i -r -s'],
|
||||
{
|
||||
silent: true
|
||||
}
|
||||
);
|
||||
|
||||
let osVersion = '';
|
||||
let osRelease = '';
|
||||
|
||||
stdout.split('\n').forEach(elem => {
|
||||
if (elem.includes('Distributor')) osVersion = elem.split(':')[1].trim();
|
||||
if (elem.includes('Release')) osRelease = elem.split(':')[1].trim();
|
||||
});
|
||||
const [osRelease, osVersion] = stdout.trim().split('\n');
|
||||
|
||||
core.debug(`OS Release: ${osRelease}, Version: ${osVersion}`);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue