@@ -1108,18 +1108,23 @@ class BinaryControl {
1108
1108
* platform and the architecture
1109
1109
*/
1110
1110
_decidePlatformAndBinary() {
1111
+ this.binaryFolder = path.resolve(
1112
+ process.env.GITHUB_WORKSPACE,
1113
+ '..', '..', '..',
1114
+ '_work',
1115
+ 'binary',
1116
+ LOCAL_BINARY_FOLDER,
1117
+ this.platform,
1118
+ );
1111
1119
switch (this.platform) {
1112
1120
case PLATFORMS.DARWIN:
1113
1121
this.binaryLink = BINARY_LINKS.DARWIN;
1114
- this.binaryFolder = path.resolve(process.env.GITHUB_WORKSPACE, '..', '..', '..', '_work', 'binary', LOCAL_BINARY_FOLDER, this.platform);
1115
1122
break;
1116
1123
case PLATFORMS.LINUX:
1117
1124
this.binaryLink = os.arch() === 'x32' ? BINARY_LINKS.LINUX_32 : BINARY_LINKS.LINUX_64;
1118
- this.binaryFolder = path.resolve(process.env.GITHUB_WORKSPACE, '..', '..', '..', '_work', 'binary', LOCAL_BINARY_FOLDER, this.platform);
1119
1125
break;
1120
1126
case PLATFORMS.WIN32:
1121
1127
this.binaryLink = BINARY_LINKS.WINDOWS;
1122
- this.binaryFolder = path.resolve(process.env.GITHUB_WORKSPACE, '..', '..', '..', '_work', 'binary', LOCAL_BINARY_FOLDER, this.platform);
1123
1128
break;
1124
1129
default:
1125
1130
throw Error(`Unsupported Platform: ${this.platform}. No BrowserStackLocal binary found.`);
@@ -1238,8 +1243,8 @@ class BinaryControl {
1238
1243
core.info('Downloading BrowserStackLocal binary...');
1239
1244
const downloadPath = await tc.downloadTool(this.binaryLink, path.resolve(this.binaryFolder, 'binaryZip'));
1240
1245
core.info(`Downloaded Path: ${downloadPath}`);
1241
- // const extractedPath = await tc.extractZip(downloadPath, this.binaryFolder);
1242
- // core.info(`BrowserStackLocal binary downloaded & extracted successfuly at: ${extractedPath}`);
1246
+ const extractedPath = await tc.extractZip(downloadPath, this.binaryFolder);
1247
+ core.info(`BrowserStackLocal binary downloaded & extracted successfuly at: ${extractedPath}`);
1243
1248
// const cachedPath = await tc.cacheDir(extractedPath, LOCAL_BINARY_NAME, '1.0.0');
1244
1249
// core.addPath(cachedPath);
1245
1250
} catch (e) {
0 commit comments