Skip to content
Permalink
Browse files
Use os.homedir to get home dir in tests
  • Loading branch information
raphinesse committed May 14, 2018
1 parent 1eaf74d commit e0fb9d7b1a706f055174fa35a2fedcd59e40b95a
Showing 1 changed file with 2 additions and 5 deletions.
@@ -18,6 +18,7 @@
*/

var fs = require('fs');
var os = require('os');
var path = require('path');

var shell = require('shelljs');
@@ -39,11 +40,7 @@ var project = path.join(tmpDir, appName);
CordovaLogger.get().setLevel(CordovaLogger.ERROR);

// Global configuration paths
var global_config_path = process.env.CORDOVA_HOME;
if (!global_config_path) {
var HOME = process.env[(process.platform.slice(0, 3) === 'win') ? 'USERPROFILE' : 'HOME'];
global_config_path = path.join(HOME, '.cordova');
}
var global_config_path = process.env.CORDOVA_HOME || path.join(os.homedir(), '.cordova');

// Setup and teardown test dirs
beforeEach(function () {

0 comments on commit e0fb9d7

Please sign in to comment.