From 1c0792e201bd0ca4940f774528b758bec691f833 Mon Sep 17 00:00:00 2001 From: Arnout Kazemier Date: Thu, 14 Jul 2011 16:50:35 +0200 Subject: [PATCH] Process variables are not always available, for example if you execute forever with a different process like monit. --- lib/forever.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/forever.js b/lib/forever.js index 4892183b..bc69b9d5 100644 --- a/lib/forever.js +++ b/lib/forever.js @@ -38,7 +38,7 @@ forever.log.cli(); // Export `version` and important Prototypes from `lib/forever/*` // forever.initialized = false; -forever.root = path.join(process.env.HOME, '.forever'); +forever.root = path.join(process.env.HOME || '/root', '.forever'); forever.config = new nconf.stores.File({ file: path.join(forever.root, 'config.json') }); forever.Forever = forever.Monitor = require('./forever/monitor').Monitor; forever.cli = require('./forever/cli');