@oclif/command
Advanced tools
Comparing version 1.5.10 to 1.5.11
@@ -0,1 +1,10 @@ | ||
## [1.5.11](https://github.com/oclif/command/compare/v1.5.10...v1.5.11) (2019-02-27) | ||
### Bug Fixes | ||
* handle epipe errors ([61d3a29](https://github.com/oclif/command/commit/61d3a29)) | ||
## [1.5.10](https://github.com/oclif/command/compare/v1.5.9...v1.5.10) (2019-02-11) | ||
@@ -2,0 +11,0 @@ |
@@ -71,2 +71,7 @@ import * as Config from '@oclif/config'; | ||
protected _version(): never; | ||
/** | ||
* swallows stdout epipe errors | ||
* this occurs when stdout closes such as when piping to head | ||
*/ | ||
protected _swallowEPIPE(): void; | ||
} |
@@ -67,2 +67,3 @@ "use strict"; | ||
g['http-call'].userAgent = this.config.userAgent; | ||
this._swallowEPIPE(); | ||
if (this._helpOverride()) | ||
@@ -128,2 +129,13 @@ return this._help(); | ||
} | ||
/** | ||
* swallows stdout epipe errors | ||
* this occurs when stdout closes such as when piping to head | ||
*/ | ||
_swallowEPIPE() { | ||
process.stdout.on('error', err => { | ||
if (err && err.code === 'EPIPE') | ||
return; | ||
throw err; | ||
}); | ||
} | ||
} | ||
@@ -130,0 +142,0 @@ Command._base = `${pjson.name}@${pjson.version}`; |
{ | ||
"name": "@oclif/command", | ||
"description": "oclif base command", | ||
"version": "1.5.10", | ||
"version": "1.5.11", | ||
"author": "Jeff Dickey @jdxcode", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/oclif/command/issues", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
49482
429
1