Skip to content

Commit

Permalink
append instead of clobber SIM_CTL_DYLD_INSERT_LIBRARIES
Browse files Browse the repository at this point in the history
  • Loading branch information
quinlanj committed Oct 26, 2018
1 parent c9d2335 commit a33d906
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions detox/src/devices/ios/AppleSimUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,15 @@ class AppleSimUtils {
` tail -F ${logsInfo.absJoined}`
};

let launchBin = `/bin/cat /dev/null >${logsInfo.absStdout} 2>${logsInfo.absStderr} && ` +
`SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="${frameworkPath}/Detox" ` +
let dylibs = `${frameworkPath}/Detox`;
if (process.env.SIMCTL_CHILD_DYLD_INSERT_LIBRARIES) {
dylibs = `${process.env.SIMCTL_CHILD_DYLD_INSERT_LIBRARIES}:${dylibs}`;
}

const launchBin = `/bin/cat /dev/null >${logsInfo.absStdout} 2>${logsInfo.absStderr} && ` +
`SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="${dylibs}" ` +
`/usr/bin/xcrun simctl launch --stdout=${logsInfo.simStdout} --stderr=${logsInfo.simStderr} ` +
`${udid} ${bundleId} --args ${args}`;;
`${udid} ${bundleId} --args ${args}`;

if (!!languageAndLocale && !!languageAndLocale.language) {
launchBin += ` -AppleLanguages "(${languageAndLocale.language})"`;
Expand Down

0 comments on commit a33d906

Please sign in to comment.