Skip to content

Commit 5a83528

Browse files
committed
check
1 parent 5827da9 commit 5a83528

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

dist/index.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28351,16 +28351,15 @@ const exec = __nccwpck_require__(5236);
2835128351
const fs = __nccwpck_require__(9896);
2835228352
const tmp = __nccwpck_require__(1288);
2835328353
const path = __nccwpck_require__(6928);
28354-
const io = __nccwpck_require__(4994);
2835528354

2835628355
const platform = process.platform;
2835728356

28358-
async function execOVM(args, options = {}) {
28357+
async function execCommand(command, args, options = {}) {
2835928358
if (platform === 'darwin') {
2836028359
const joinedArgs = args.map(a => `'${a}'`).join(' ');
28361-
await exec.exec('bash', ['-c', `ovm ${joinedArgs}`], options);
28360+
await exec.exec('bash', ['-c', `${command} ${joinedArgs}`], options);
2836228361
} else {
28363-
await exec.exec('ovm', args, options);
28362+
await exec.exec(command, args, options);
2836428363
}
2836528364
}
2836628365

@@ -28398,7 +28397,6 @@ async function run() {
2839828397
}
2839928398

2840028399
if (platform == 'linux') {
28401-
2840228400
var tmpFile = tmp.fileSync();
2840328401
fs.writeFileSync(tmpFile.name, installLinux());
2840428402
await exec.exec('bash ' + tmpFile.name);
@@ -28413,8 +28411,8 @@ async function run() {
2841328411
fs.unlinkSync(tmpFile.name);
2841428412
}
2841528413

28416-
await execOVM(['install', osVersion]);
28417-
await execOVM(['use', osVersion]);
28414+
await execCommand('ovm', ['install', osVersion]);
28415+
await execCommand('ovm', ['use', osVersion]);
2841828416

2841928417
let output = '';
2842028418
const options = {};
@@ -28425,7 +28423,7 @@ async function run() {
2842528423
}
2842628424
}
2842728425
};
28428-
await execOVM(['which', 'current'], options);
28426+
await execCommand('ovm', ['which', 'current'], options);
2842928427
let pathOscript = path.dirname(output);
2843028428

2843128429
core.addPath(pathOscript);

src/index.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@ const exec = require('@actions/exec');
33
const fs = require('fs');
44
const tmp = require('tmp');
55
const path = require('path');
6-
const io = require('@actions/io');
76

87
const platform = process.platform;
98

10-
async function execOVM(args, options = {}) {
9+
async function execCommand(command, args, options = {}) {
1110
if (platform === 'darwin') {
1211
const joinedArgs = args.map(a => `'${a}'`).join(' ');
13-
await exec.exec('bash', ['-c', `ovm ${joinedArgs}`], options);
12+
await exec.exec('bash', ['-c', `${command} ${joinedArgs}`], options);
1413
} else {
15-
await exec.exec('ovm', args, options);
14+
await exec.exec(command, args, options);
1615
}
1716
}
1817

@@ -50,7 +49,6 @@ async function run() {
5049
}
5150

5251
if (platform == 'linux') {
53-
5452
var tmpFile = tmp.fileSync();
5553
fs.writeFileSync(tmpFile.name, installLinux());
5654
await exec.exec('bash ' + tmpFile.name);
@@ -65,8 +63,8 @@ async function run() {
6563
fs.unlinkSync(tmpFile.name);
6664
}
6765

68-
await execOVM(['install', osVersion]);
69-
await execOVM(['use', osVersion]);
66+
await execCommand('ovm', ['install', osVersion]);
67+
await execCommand('ovm', ['use', osVersion]);
7068

7169
let output = '';
7270
const options = {};
@@ -77,7 +75,7 @@ async function run() {
7775
}
7876
}
7977
};
80-
await execOVM(['which', 'current'], options);
78+
await execCommand('ovm', ['which', 'current'], options);
8179
let pathOscript = path.dirname(output);
8280

8381
core.addPath(pathOscript);

0 commit comments

Comments
 (0)