Update exec command, remove mock from unit tests

This commit is contained in:
panticmilos 2022-07-18 18:24:59 +02:00
parent 6e46140c9c
commit 96d176662d
3 changed files with 4 additions and 23 deletions

11
dist/setup/index.js vendored
View file

@ -65484,17 +65484,10 @@ function isCacheFeatureAvailable() {
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
function getLinuxOSReleaseInfo() {
return __awaiter(this, void 0, void 0, function* () {
const { stdout, stderr, exitCode } = yield exec.getExecOutput('lsb_release', ['-a'], {
const { stdout, stderr, exitCode } = yield exec.getExecOutput('lsb_release', ['-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}`);
return `${osVersion}-${osRelease}`;
});