Skip to content

Commit

Permalink
Remove compatibility layer for util.getSystemErrorName() (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky authored and sindresorhus committed May 7, 2019
1 parent 575d464 commit 4cd3d35
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 67 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';
const path = require('path');
const os = require('os');
const util = require('util');
const childProcess = require('child_process');
const crossSpawn = require('cross-spawn');
const stripFinalNewline = require('strip-final-newline');
Expand All @@ -10,7 +11,6 @@ const _getStream = require('get-stream');
const mergeStream = require('merge-stream');
const pFinally = require('p-finally');
const onExit = require('signal-exit');
const errname = require('./lib/errname');
const stdio = require('./lib/stdio');

const TEN_MEGABYTES = 1000 * 1000 * 10;
Expand Down Expand Up @@ -220,7 +220,7 @@ function getCode({error = {}}, code) {
}

if (Number.isInteger(code)) {
return [errname(-Math.abs(code)), Math.abs(code)];
return [util.getSystemErrorName(-Math.abs(code)), Math.abs(code)];
}

return [];
Expand Down
39 changes: 0 additions & 39 deletions lib/errname.js

This file was deleted.

26 changes: 0 additions & 26 deletions test/errname.js

This file was deleted.

0 comments on commit 4cd3d35

Please sign in to comment.