@@ -1108,18 +1108,23 @@ class BinaryControl {
11081108 * platform and the architecture
11091109 */
11101110 _decidePlatformAndBinary() {
1111+ this.binaryFolder = path.resolve(
1112+ process.env.GITHUB_WORKSPACE,
1113+ '..', '..', '..',
1114+ '_work',
1115+ 'binary',
1116+ LOCAL_BINARY_FOLDER,
1117+ this.platform,
1118+ );
11111119 switch (this.platform) {
11121120 case PLATFORMS.DARWIN:
11131121 this.binaryLink = BINARY_LINKS.DARWIN;
1114- this.binaryFolder = path.resolve(process.env.GITHUB_WORKSPACE, '..', '..', '..', '_work', 'binary', LOCAL_BINARY_FOLDER, this.platform);
11151122 break;
11161123 case PLATFORMS.LINUX:
11171124 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);
11191125 break;
11201126 case PLATFORMS.WIN32:
11211127 this.binaryLink = BINARY_LINKS.WINDOWS;
1122- this.binaryFolder = path.resolve(process.env.GITHUB_WORKSPACE, '..', '..', '..', '_work', 'binary', LOCAL_BINARY_FOLDER, this.platform);
11231128 break;
11241129 default:
11251130 throw Error(`Unsupported Platform: ${this.platform}. No BrowserStackLocal binary found.`);
@@ -1238,8 +1243,8 @@ class BinaryControl {
12381243 core.info('Downloading BrowserStackLocal binary...');
12391244 const downloadPath = await tc.downloadTool(this.binaryLink, path.resolve(this.binaryFolder, 'binaryZip'));
12401245 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}`);
12431248 // const cachedPath = await tc.cacheDir(extractedPath, LOCAL_BINARY_NAME, '1.0.0');
12441249 // core.addPath(cachedPath);
12451250 } catch (e) {
0 commit comments