diff --git a/scripts/replace_all.js b/scripts/replace_all.js index ea28600f6..f7d5d379c 100644 --- a/scripts/replace_all.js +++ b/scripts/replace_all.js @@ -5,8 +5,9 @@ npm run-script insert-placeholder-values */ var fs = require('fs'); +var os = require('os'); var REPLACEMENT_TYPE = process.argv[2]; -var myEnv = require(getUserHome() + '/.campusmobile/env.js'); +var myEnv = require(os.homedir() + '/.campusmobile/env.js'); var APP_SETTINGS_PATH = './app/AppSettings.js'; @@ -92,7 +93,3 @@ function makeReplacements(FILE_PATH, REPLACEMENT_TYPE, REPLACEMENTS) { } }); } - -function getUserHome() { - return process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME']; -}