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-18097]: Fix CLI crashes #6413

Merged
merged 3 commits into from
Dec 2, 2014
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
6 changes: 4 additions & 2 deletions android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,7 @@ AndroidBuilder.prototype.validate = function validate(logger, config, cli) {
}
});
}
});
}, this);

// check missing abis
var missingAbis = module.abis.length && this.abis.filter(function (a) { return module.abis.indexOf(a) == -1; });
Expand Down Expand Up @@ -1870,14 +1870,16 @@ AndroidBuilder.prototype.computeHashes = function computeHashes(next) {
this.activitiesHash = this.hash(android && android.application && android.application ? JSON.stringify(android.application.activities) : '');
this.servicesHash = this.hash(android && android.services ? JSON.stringify(android.services) : '');

var self = this;

function walk(dir, re) {
var hashes = [];
fs.existsSync(dir) && fs.readdirSync(dir).forEach(function (name) {
var file = path.join(dir, name);
if (fs.existsSync(file)) {
var stat = fs.statSync(file);
if (stat.isFile() && re.test(name)) {
hashes.push(this.hash(fs.readFileSync(file).toString()));
hashes.push(self.hash(fs.readFileSync(file).toString()));
} else if (stat.isDirectory()) {
hashes = hashes.concat(walk(file, re));
}
Expand Down