Skip to content

Commit

Permalink
Remove hacks for Node v0.10
Browse files Browse the repository at this point in the history
Note: We already lost Node v0.10 support when switching to ESLint 3
(which now requires at least Node v4).

standard v8 won't support less than Node v4.
  • Loading branch information
feross committed Aug 10, 2016
1 parent 3bd0b23 commit b43d0ce
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions test/clone.js
Expand Up @@ -68,7 +68,7 @@ test('test github repos that use `standard`', function (t) {
var url = pkg.repo + '.git'
var folder = path.join(TMP, name)
return function (cb) {
access(path.join(TMP, name), fs.R_OK | fs.W_OK, function (err) {
fs.access(path.join(TMP, name), fs.R_OK | fs.W_OK, function (err) {
if (argv.offline) {
if (err) {
t.pass('SKIPPING (offline): ' + name + ' (' + pkg.repo + ')')
Expand Down Expand Up @@ -130,16 +130,3 @@ function spawn (command, args, opts, cb) {
})
return child
}

function access (path, mode, callback) {
if (typeof mode === 'function') {
return access(path, null, callback)
}

// Node v0.10 lacks `fs.access`, which is faster, so fallback to `fs.stat`
if (typeof fs.access === 'function') {
fs.access(path, mode, callback)
} else {
fs.stat(path, callback)
}
}

0 comments on commit b43d0ce

Please sign in to comment.