diff --git a/cli.js b/cli.js index aed3213..9394e03 100755 --- a/cli.js +++ b/cli.js @@ -76,6 +76,7 @@ var cli = meow( /* Set-up. */ var defaultGlobs = ['{docs/**/,doc/**/,}*.{' + extensions.join(',') + '}'] +var silentlyIgnore var globs if (cli.flags.stdin) { @@ -84,6 +85,7 @@ if (cli.flags.stdin) { } } else if (cli.input.length === 0) { globs = defaultGlobs + silentlyIgnore = true } else { globs = cli.input } @@ -100,6 +102,7 @@ engine( rcName: '.alexrc', packageField: 'alex', ignoreName: '.alexignore', + silentlyIgnore: silentlyIgnore, frail: true, defaultConfig: transform() }, diff --git a/test/cli.js b/test/cli.js index 33d5812..2fb07c9 100644 --- a/test/cli.js +++ b/test/cli.js @@ -136,21 +136,12 @@ test('non-binary (optional)', function(t) { }) test('default globs', function(t) { - return execa.stderr('./cli.js').catch(function(err) { + return execa.stderr('./cli.js').then(function(stderr) { var expected = [ - 'code-of-conduct.md', - ' 1:1 error Cannot process specified file: it’s ignored', - '', 'contributing.md: no issues found', - 'example.md', - ' 1:1 error Cannot process specified file: it’s ignored', - '', - 'readme.md: no issues found', - '', - '✖ 2 errors', - '' + 'readme.md: no issues found' ].join('\n') - t.is(err.stderr, expected) + t.is(stderr, expected) }) })