Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
fix: don't sync constructor package on exists mode
Browse files Browse the repository at this point in the history
closes #857
  • Loading branch information
fengmk2 committed Apr 9, 2016
1 parent a74d60c commit 9a6094d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ addons:
- postgresql: '9.3'
script: 'make test-travis-all'
after_script:
- "npm i codecov && codecov"
- 'npm i codecov && codecov'
6 changes: 3 additions & 3 deletions sync/sync_exist.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function intersection(arrOne, arrTwo) {
map[name] = true;
});
arrTwo.forEach(function (name) {
map[name] && results.push(name);
map[name] === true && results.push(name);
});
return results;
}
Expand All @@ -48,7 +48,7 @@ module.exports = function* sync() {

var allPackages;
if (!info.last_exist_sync_time) {
var pkgs = yield* npmService.getShort();
var pkgs = yield npmService.getShort();
debug('First time sync all packages from official registry, got %d packages', pkgs.length);
if (info.last_sync_module) {
// start from last success
Expand All @@ -74,7 +74,7 @@ module.exports = function* sync() {
fails: []
};
}
debug('Total %d packages to sync', packages.length);
debug('Total %d packages to sync, top 10: %j', packages.length, packages.slice(0, 10));

var worker = new SyncModuleWorker({
username: 'admin',
Expand Down

0 comments on commit 9a6094d

Please sign in to comment.