mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
make unspecified settings file totally obvious in debug.
This commit is contained in:
parent
529a691e1d
commit
93136961b9
6
red.js
6
red.js
@ -75,13 +75,13 @@ if (parsedArgs.settings) {
|
|||||||
// NODE_RED_HOME contains user data - use its settings.js
|
// NODE_RED_HOME contains user data - use its settings.js
|
||||||
settingsFile = path.join(process.env.NODE_RED_HOME,"settings.js");
|
settingsFile = path.join(process.env.NODE_RED_HOME,"settings.js");
|
||||||
} else {
|
} else {
|
||||||
var userSettingsFile = path.join(process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE,".node-red","settings.js");
|
var userSettingsFile = path.join(process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE,".node-red","settings.js");
|
||||||
if (fs.existsSync(userSettingsFile)) {
|
if (fs.existsSync(userSettingsFile)) {
|
||||||
// $HOME/.node-red/settings.js exists
|
// $HOME/.node-red/settings.js exists
|
||||||
settingsFile = userSettingsFile;
|
settingsFile = userSettingsFile;
|
||||||
} else {
|
} else {
|
||||||
// Use default settings.js
|
// Use default settings.js
|
||||||
settingsFile = "./settings";
|
settingsFile = __dirname+"/settings.js";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -261,6 +261,6 @@ process.on('uncaughtException',function(err) {
|
|||||||
process.on('SIGINT', function () {
|
process.on('SIGINT', function () {
|
||||||
RED.stop();
|
RED.stop();
|
||||||
// TODO: need to allow nodes to close asynchronously before terminating the
|
// TODO: need to allow nodes to close asynchronously before terminating the
|
||||||
// process - ie, promises
|
// process - ie, promises
|
||||||
process.exit();
|
process.exit();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user