From 444a89741094d6c52dd305de1fa09806330efcee Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 4 Mar 2015 21:47:38 +0000 Subject: [PATCH] Resort to NODE_RED_HOME if User HOME not found Fixes #575 --- red/storage/localfilesystem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/red/storage/localfilesystem.js b/red/storage/localfilesystem.js index e73fd0087..7c02f3444 100644 --- a/red/storage/localfilesystem.js +++ b/red/storage/localfilesystem.js @@ -151,7 +151,7 @@ var localfilesystem = { if (fs.existsSync(fspath.join(process.env.NODE_RED_HOME,".config.json"))) { settings.userDir = process.env.NODE_RED_HOME; } else { - settings.userDir = fspath.join(process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE,".node-red"); + settings.userDir = fspath.join(process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE || process.env.NODE_RED_HOME,".node-red"); promises.push(promiseDir(settings.userDir)); } }