Skip to content

Commit abf923e

Browse files
author
Dane Springmeyer
committed
fix display of missing/required properties
1 parent 66b4513 commit abf923e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/info.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
module.exports = exports = unpublish
33

4-
exports.usage = 'Fetches info on published binaries'
4+
exports.usage = 'Lists all published binaries'
55

66
var fs = require('fs')
77
, path = require('path')

lib/util/versioning.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,15 @@ function validate_config(package_json,callback) {
5959
}
6060
var o = package_json.binary;
6161
required_parameters.forEach(function(p) {
62+
if (missing.indexOf('binary') > -1) {
63+
missing.pop('binary');
64+
}
6265
if (!o || o[p] == undefined) {
63-
missing.push('binary.' + o);
66+
missing.push('binary.' + p);
6467
}
6568
});
6669
if (missing.length >= 1) {
67-
throw new Error(msg+"package.json must declare these properties: " + missing.join(','));
70+
throw new Error(msg+"package.json must declare these properties: \n" + missing.join('\n'));
6871
}
6972
if (o) {
7073
// enforce https over http

0 commit comments

Comments
 (0)