1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Update packages/node_modules/node-red/red.js

Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
This commit is contained in:
Ben Hardill 2022-04-21 15:47:40 +01:00 committed by GitHub
parent 0014fec63f
commit cdcc8cc59a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,7 +113,7 @@ if (parsedArgs.settings) {
settingsFile = path.join(process.env.HOMEPATH,".node-red","settings.js"); settingsFile = path.join(process.env.HOMEPATH,".node-red","settings.js");
} else { } else {
if (!parsedArgs.userDir && !(process.env.HOME || process.env.USERPROFILE || process.env.HOMEPATH)) { if (!parsedArgs.userDir && !(process.env.HOME || process.env.USERPROFILE || process.env.HOMEPATH)) {
console.log("User has no Home Directory and no userDir set") console.log("Could not find user directory. Ensure $HOME is set for the current user, or use --userDir option")
process.exit(1) process.exit(1)
} }
var userDir = parsedArgs.userDir || path.join(process.env.HOME || process.env.USERPROFILE || process.env.HOMEPATH,".node-red"); var userDir = parsedArgs.userDir || path.join(process.env.HOME || process.env.USERPROFILE || process.env.HOMEPATH,".node-red");