// foo.js
'use strict';
const yargs = require('yargs');
yargs
.help('help').alias('help', 'h')
.command('foo', 'Foo command is awesome', () => {
console.log('foo handler');
throw new Error('This error will show below the help');
})
.argv;
If you now run node foo it will show the usage and the error below.

I was expecting the error to be thrown globally and not being handled by yargs.
yargs version: 4.3.2