Skip to content

Commit

Permalink
fix(launcher): compatibility with Node v0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina committed Dec 24, 2013
1 parent ffb7480 commit 6a46be9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/temp_dir.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
var path = require('path');
var fs = require('fs');
var TEMP_DIR = require('os').tmpdir();
var os = require('os');
var rimraf = require('rimraf');
var log = require('./logger').create('temp-dir');

// Node v0.8 uses tmpDir(), v0.10 uses tmpdir().
var TEMP_DIR = os.tmpdir ? os.tmpdir() : os.tmpDir();

module.exports = {
getPath: function(suffix) {
return path.normalize(TEMP_DIR + suffix);
Expand Down

0 comments on commit 6a46be9

Please sign in to comment.