Skip to content

Commit fcbe083

Browse files
author
Hsiaoming Yang
committed
fix update script
1 parent dc349a2 commit fcbe083

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

update.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ modules.forEach(function(m) {
1010
var module = require('./' + m + '/package.json')
1111
if (module.package) {
1212
getJSON(module.package, function(data) {
13-
console.log('')
1413
if (data.version !== module.version) {
1514
console.info(module.name + ' ' + module.version + ' (latest ' + data.version + ')')
1615
} else {
@@ -22,15 +21,14 @@ modules.forEach(function(m) {
2221
var repo = repo.replace('https://github.com/', '')
2322
var repo = repo.replace('.git', '')
2423
getVersion(repo, function(version) {
25-
console.log('')
2624
if (module.version != version) {
2725
console.info(module.name + ' ' + module.version + ' (latest ' + version + ')')
2826
} else {
2927
console.info(module.name + ' ' + module.version)
3028
}
3129
})
3230
} else {
33-
console.info('\n' + module.name + ' ' + module.version + ' (check manually)')
31+
console.info(module.name + ' ' + module.version + ' (check manually)')
3432
}
3533
})
3634

@@ -41,7 +39,8 @@ function getJSON(uri, callback) {
4139

4240
connect.get(options, function(res) {
4341
if (res.statusCode !== 200) {
44-
throw 'Error: No data received from ' + uri
42+
console.error('Error: No data received from ' + uri)
43+
return;
4544
}
4645

4746
var ret = [], length = 0

0 commit comments

Comments
 (0)