Skip to content

Commit

Permalink
Merge pull request #86 from alexandreferreirafr/master
Browse files Browse the repository at this point in the history
#83 use os.tmpdir for earlier versions of node
  • Loading branch information
yosuke-furukawa committed Oct 13, 2017
2 parents 60a41d8 + b7ba0ad commit 973f5cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exercises/babel-processor.js
Expand Up @@ -6,7 +6,7 @@ var path = require("path");
var os = require("os");
var rimraf = require("rimraf");

var tmpDir = path.resolve(os.tmpDir(), "_babel_" + process.pid);
var tmpDir = os.tmpdir ? path.resolve(os.tmpdir(), "_babel_" + process.pid) : path.resolve(os.tmpDir(), "_babel_" + process.pid);

module.exports = function (exercise) {
exercise.addProcessor(processor);
Expand All @@ -20,8 +20,8 @@ function processor(mode, callback) {

q.nfcall(fs.mkdir, tmpDir).then(function () {
return q.nfcall(
fs.symlink,
path.resolve(__dirname + '/../node_modules'),
fs.symlink,
path.resolve(__dirname + '/../node_modules'),
tmpDir + '/node_modules');
})
.then(function(){
Expand Down

0 comments on commit 973f5cc

Please sign in to comment.