mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
let copy of settings file occur on a clean install.
This commit is contained in:
parent
28678acf74
commit
a55027b838
3
red.js
3
red.js
@ -70,6 +70,7 @@ if (parsedArgs.help) {
|
|||||||
console.log("Documentation can be found at http://nodered.org");
|
console.log("Documentation can be found at http://nodered.org");
|
||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parsedArgs.argv.remain.length > 0) {
|
if (parsedArgs.argv.remain.length > 0) {
|
||||||
flowFile = parsedArgs.argv.remain[0];
|
flowFile = parsedArgs.argv.remain[0];
|
||||||
}
|
}
|
||||||
@ -93,7 +94,7 @@ if (parsedArgs.settings) {
|
|||||||
} else {
|
} else {
|
||||||
var defaultSettings = path.join(__dirname,"settings.js");
|
var defaultSettings = path.join(__dirname,"settings.js");
|
||||||
var settingsStat = fs.statSync(defaultSettings);
|
var settingsStat = fs.statSync(defaultSettings);
|
||||||
if (settingsStat.mtime.getTime() < settingsStat.ctime.getTime()) {
|
if (settingsStat.mtime.getTime() <= settingsStat.ctime.getTime()) {
|
||||||
// Default settings file has not been modified - safe to copy
|
// Default settings file has not been modified - safe to copy
|
||||||
fs.copySync(defaultSettings,userSettingsFile);
|
fs.copySync(defaultSettings,userSettingsFile);
|
||||||
settingsFile = userSettingsFile;
|
settingsFile = userSettingsFile;
|
||||||
|
Loading…
Reference in New Issue
Block a user