Skip to content

Commit

Permalink
Followup jshint#687: Use '-' as a marker for stding
Browse files Browse the repository at this point in the history
  • Loading branch information
valueof committed Jul 1, 2013
1 parent 68db0d8 commit 90b733b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ var exports = {
var results = [];
var data = [];

if (files.length === 0) {
if (opts.useStdin) {
cli.withStdin(function (code) {
lint(code, results, opts.config || {}, data);
(opts.reporter || defReporter)(results, data, { verbose: opts.verbose });
Expand Down Expand Up @@ -457,7 +457,8 @@ var exports = {
reporter: reporter,
ignores: loadIgnores(),
extensions: options["extra-ext"],
verbose: options.verbose
verbose: options.verbose,
useStdin: args[args.length - 1] === "-"
}, done));
}
};
Expand Down

0 comments on commit 90b733b

Please sign in to comment.