Skip to content

Commit 36c3dbc

Browse files
committed
FIx: Cross OS issue
1 parent df7b87c commit 36c3dbc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

bin/helpers/capabilityHelper.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,17 @@ const getAccessibilityPlatforms = (bsConfig) => {
183183
const addCypressZipStartLocation = (runSettings) => {
184184
let resolvedHomeDirectoryPath = path.resolve(runSettings.home_directory);
185185
let resolvedCypressConfigFilePath = path.resolve(runSettings.cypressConfigFilePath);
186-
runSettings.cypressZipStartLocation = path.dirname(resolvedCypressConfigFilePath.split(resolvedHomeDirectoryPath)[1]);
186+
187+
// Convert to POSIX style paths for consistent behavior
188+
let posixHomePath = resolvedHomeDirectoryPath.split(path.sep).join(path.posix.sep);
189+
let posixConfigPath = resolvedCypressConfigFilePath.split(path.sep).join(path.posix.sep);
190+
191+
runSettings.cypressZipStartLocation = path.posix.dirname(posixConfigPath.split(posixHomePath)[1]);
187192
runSettings.cypressZipStartLocation = runSettings.cypressZipStartLocation.substring(1);
188193
logger.debug(`Setting cypress zip start location = ${runSettings.cypressZipStartLocation}`);
189194
}
190195

196+
191197
const validate = (bsConfig, args) => {
192198
return new Promise(function (resolve, reject) {
193199
logger.info(Constants.userMessages.VALIDATING_CONFIG);

0 commit comments

Comments
 (0)