Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-25028] Fix issue where node-ios-device is not hoisted #9260

Merged
merged 2 commits into from
Jul 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 13 additions & 9 deletions build/packager.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,19 @@ Packager.prototype.package = function (next) {
}.bind(this),
// Now include all the pre-built node-ios-device bindings/binaries
function (cb) {
if (this.targetOS == 'osx') {
exec('node bin/download-all.js', {cwd: path.join(this.zipSDKDir, 'node_modules', 'node-ios-device')}, function (err, stdout, stderr) {
if (err) {
console.log(stdout);
console.error(stderr);
return cb(err);
}
cb();
});
if (this.targetOS === 'osx') {
var dir = path.join(this.zipSDKDir, 'node_modules', 'node-ios-device');

if (!fs.existsSync(dir)) {
dir = path.join(this.zipSDKDir, 'node_modules', 'ioslib', 'node_modules', 'node-ios-device');
}

if (!fs.existsSync(dir)) {
return cb(new Error('Unable to find node-ios-device module'));
}

exec('node bin/download-all.js', { cwd: dir, stdio: 'inherit' }, cb);

} else {
cb();
}
Expand Down