yargs 3.5.3 → 3.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/usage.js CHANGED
@@ -34,14 +34,10 @@ module.exports = function (yargs) {
34
34
  f(msg);
35
35
  });
36
36
  } else {
37
- if (showHelpOnFail) {
38
- yargs.showHelp("error");
39
- }
37
+ if (showHelpOnFail) yargs.showHelp("error");
40
38
  if (msg) console.error(msg);
41
39
  if (failMessage) {
42
- if (msg) {
43
- console.error("");
44
- }
40
+ if (msg) console.error("");
45
41
  console.error(failMessage);
46
42
  }
47
43
  if (yargs.getExitProcess()){
package/lib/validation.js CHANGED
@@ -9,7 +9,7 @@ module.exports = function (yargs, usage) {
9
9
  var demanded = yargs.getDemanded();
10
10
 
11
11
  if (demanded._ && argv._.length < demanded._.count) {
12
- if (demanded._.msg) {
12
+ if (demanded._.msg !== undefined) {
13
13
  usage.fail(demanded._.msg);
14
14
  } else {
15
15
  usage.fail('Not enough non-option arguments: got '
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yargs",
3
- "version": "3.5.3",
3
+ "version": "3.5.4",
4
4
  "description": "Light-weight option parsing with an argv hash. No optstrings attached.",
5
5
  "main": "./index.js",
6
6
  "files": [