diff --git a/index.js b/index.js index 59384f654..d9bd7f9e0 100644 --- a/index.js +++ b/index.js @@ -3,13 +3,14 @@ require('./lib/babel').avaRequired(); var setImmediate = require('set-immediate-shim'); var hasFlag = require('has-flag'); var chalk = require('chalk'); +var join = require('path').join; var relative = require('path').relative; var serializeError = require('destroy-circular'); var Runner = require('./lib/runner'); var log = require('./lib/logger'); var runner = new Runner(); var xdgBasedir = require('xdg-basedir'); -var cache = require('cacha')(xdgBasedir.cache + '/ava'); +var cache = require('cacha')(join(xdgBasedir.cache, 'ava')); var Configstore = require('configstore'); var config = new Configstore('ava', { lastCacheClean: Date.now() diff --git a/lib/babel.js b/lib/babel.js index fccf1bdf9..4d9e8afc5 100644 --- a/lib/babel.js +++ b/lib/babel.js @@ -5,7 +5,8 @@ var requireFromString = require('require-from-string'); var hasha = require('hasha'); var hashObj = require('hash-obj'); var xdgBasedir = require('xdg-basedir'); -var cache = require('cacha')(xdgBasedir.cache + '/ava'); +var path = require('path'); +var cache = require('cacha')(path.join(xdgBasedir.cache, 'ava')); var hasGenerators = parseInt(process.version.slice(1), 10) > 0; var testPath = process.argv[2];