@@ -33231,32 +33231,33 @@ module.exports = parseParams
3323133231/******/
3323233232/************************************************************************/
3323333233var __webpack_exports__ = {};
33234- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk .
33234+ // This entry need to be wrapped in an IIFE because it need to be in strict mode .
3323533235(() => {
33236- const semver = __nccwpck_require__(1383);
33237- const path = __nccwpck_require__(1017);
33238- const core = __nccwpck_require__(2186);
33236+ "use strict";
33237+ var exports = __webpack_exports__;
33238+
33239+ Object.defineProperty(exports, "__esModule", ({ value: true }));
3323933240const tc = __nccwpck_require__(7784);
33241+ const core = __nccwpck_require__(2186);
3324033242const exec = __nccwpck_require__(1514);
33241- const fs = (__nccwpck_require__(7147).promises);
33242-
33243+ const semver = __nccwpck_require__(1383);
33244+ const path = __nccwpck_require__(1017);
33245+ const fs = __nccwpck_require__(7147);
3324333246const ovrPlatformUtil = 'ovr-platform-util';
33244- const IS_WINDOWS = process.platform === 'win32'
33245- const IS_MAC = process.platform === 'darwin'
33247+ const IS_WINDOWS = process.platform === 'win32';
33248+ const IS_MAC = process.platform === 'darwin';
3324633249const toolExtension = IS_WINDOWS ? '.exe' : '';
3324733250const toolPath = `${ovrPlatformUtil}${toolExtension}`;
33248-
3324933251const main = async () => {
3325033252 try {
3325133253 core.info(`Setting up ${ovrPlatformUtil}...`);
3325233254 await setup_ovrPlatformUtil();
33253- } catch (error) {
33255+ }
33256+ catch (error) {
3325433257 core.setFailed(error);
3325533258 }
33256- }
33257-
33259+ };
3325833260main();
33259-
3326033261async function setup_ovrPlatformUtil() {
3326133262 let toolDirectory = tc.find(ovrPlatformUtil, '*');
3326233263 let tool = undefined;
@@ -33273,41 +33274,39 @@ async function setup_ovrPlatformUtil() {
3327333274 core.debug(`Setting tool cache: ${archivePath} | ${toolPath} | ${ovrPlatformUtil} | ${downloadVersion}`);
3327433275 toolDirectory = await tc.cacheFile(archivePath, toolPath, ovrPlatformUtil, downloadVersion);
3327533276 tool = getExecutable(toolDirectory);
33276- } else {
33277+ }
33278+ else {
3327733279 tool = getExecutable(toolDirectory);
33278- fs.access(tool);
33280+ fs.promises. access(tool);
3327933281 core.debug(`Found ${tool} in ${toolDirectory}`);
33280- await exec.exec(tool, 'self-update');
33282+ await exec.exec(tool, [ 'self-update'] );
3328133283 }
33282- core.debug(`${ovrPlatformUtil} -> ${toolDirectory}`)
33284+ core.debug(`${ovrPlatformUtil} -> ${toolDirectory}`);
3328333285 core.addPath(toolDirectory);
33284- await exec.exec(ovrPlatformUtil, 'help');
33286+ await exec.exec(ovrPlatformUtil, [ 'help'] );
3328533287}
33286-
3328733288function getDownloadUrl() {
3328833289 if (IS_MAC) {
3328933290 return 'https://www.oculus.com/download_app/?id=1462426033810370';
33290- } else if (IS_WINDOWS) {
33291+ }
33292+ else if (IS_WINDOWS) {
3329133293 return 'https://www.oculus.com/download_app/?id=1076686279105243';
33292- } else {
33294+ }
33295+ else {
3329333296 throw Error(`${ovrPlatformUtil} not available for ${process.platform}`);
3329433297 }
3329533298}
33296-
3329733299function getTempDirectory() {
33298- const tempDirectory = process.env['RUNNER_TEMP'] || ''
33299- return tempDirectory
33300+ const tempDirectory = process.env['RUNNER_TEMP'] || '';
33301+ return tempDirectory;
3330033302}
33301-
3330233303function getExecutable(directory) {
3330333304 return path.join(directory, toolPath);
3330433305}
33305-
3330633306async function getVersion(tool) {
3330733307 const semVerRegEx = new RegExp(/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)?/);
3330833308 let output = '';
33309-
33310- await exec.exec(tool, 'version', {
33309+ await exec.exec(tool, ['version'], {
3331133310 listeners: {
3331233311 stdout: (data) => {
3331333312 output += data.toString();
@@ -33324,7 +33323,7 @@ async function getVersion(tool) {
3332433323 if (!version) {
3332533324 throw Error("Failed to find a valid version");
3332633325 }
33327- return version
33326+ return version;
3332833327}
3332933328
3333033329})();
0 commit comments