Skip to content

Error when piping to less #402

Open
Open
@apennebaker

Description

@apennebaker

I like to scroll through linter output with the Unix less command. This mostly works, but when I quit from less, csslint experiences an EPIPE error.

$ csslint .
...
$ csslint . | less
...
q
fs.js:528
  return binding.write(fd, buffer, offset, length, position);
                 ^
Error: EPIPE, broken pipe
    at Object.fs.writeSync (fs.js:528:18)
    at Object.cli.print (/Users/apennebaker/.nvm/v0.10.15/lib/node_modules/csslint/cli.js:315:12)
    at processFile (/Users/apennebaker/.nvm/v0.10.15/lib/node_modules/csslint/cli.js:144:21)
    at /Users/apennebaker/.nvm/v0.10.15/lib/node_modules/csslint/cli.js:210:25
    at Array.forEach (native)
    at processFiles (/Users/apennebaker/.nvm/v0.10.15/lib/node_modules/csslint/cli.js:206:23)
    at cli (/Users/apennebaker/.nvm/v0.10.15/lib/node_modules/csslint/cli.js:298:14)
    at Object.<anonymous> (/Users/apennebaker/.nvm/v0.10.15/lib/node_modules/csslint/cli.js:311:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

Could csslint play a little nicer when being piped (e.g., check isTTY())? How does jshint do this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions