mirror of https://github.com/node-red/node-red.git
Assume -d params are strings if they don't otherwise parse
parent
c0f4e07e10
commit
c8f6100a6a
|
@ -153,7 +153,12 @@ if (parsedArgs.define) {
|
|||
var match = /^(([^=]+)=(.+)|@(.*))$/.exec(def);
|
||||
if (match) {
|
||||
if (!match[4]) {
|
||||
var val = JSON.parse(match[3]);
|
||||
var val = match[3];
|
||||
try {
|
||||
val = JSON.parse(match[3]);
|
||||
} catch(err) {
|
||||
// Leave it as a string
|
||||
}
|
||||
RED.util.setObjectProperty(settings, match[2], val, true);
|
||||
} else {
|
||||
var obj = fs.readJsonSync(match[4]);
|
||||
|
|
Loading…
Reference in New Issue