Skip to content
Permalink
Browse files
Use os.homedir to get home dir
  • Loading branch information
raphinesse committed May 13, 2018
1 parent 391fbb6 commit 1f44163585caeb08d014c335096a004333b0e1a7
Showing 1 changed file with 3 additions and 5 deletions.
@@ -18,6 +18,7 @@
*/

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

var Q = require('q');
@@ -35,11 +36,8 @@ var CordovaLogger = require('cordova-common').CordovaLogger.get();
const DEFAULT_VERSION = '1.0.0';

// 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');

/**
* Sets up to forward events to another instance, or log console.
* This will make the create internal events visible outside

0 comments on commit 1f44163

Please sign in to comment.