I tried:
export some_var=123
in terminal
and tried to read it as explained in the docs. But it returns empty. Also, I tried export some_var=123
inside exec node just in case if nodered was on different environment. It still results empty.
[
{
"id": "d17299e5.9ff148",
"type": "tab",
"label": "Flow 5",
"disabled": false,
"info": ""
},
{
"id": "d66f687a.d01248",
"type": "change",
"z": "d17299e5.9ff148",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "some_var",
"tot": "env"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 380,
"y": 140,
"wires": [
[
"67cb1bc6.0b3724"
]
]
},
{
"id": "578fe08e.8f056",
"type": "inject",
"z": "d17299e5.9ff148",
"name": "",
"props": [
{
"p": "payload",
"v": "",
"vt": "date"
},
{
"p": "topic",
"v": "",
"vt": "string"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 160,
"y": 140,
"wires": [
[
"d66f687a.d01248"
]
]
},
{
"id": "67cb1bc6.0b3724",
"type": "debug",
"z": "d17299e5.9ff148",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 580,
"y": 140,
"wires": []
},
{
"id": "0a79e7b4cbf4e1cb",
"type": "exec",
"z": "d17299e5.9ff148",
"command": "export some_var=123",
"addpay": "",
"append": "",
"useSpawn": "false",
"timer": "",
"winHide": false,
"oldrc": false,
"name": "",
"x": 400,
"y": 80,
"wires": [
[
"a67d205f48f957c7"
],
[],
[]
]
},
{
"id": "48b8a588201d86de",
"type": "inject",
"z": "d17299e5.9ff148",
"name": "",
"props": [
{
"p": "payload",
"v": "",
"vt": "date"
},
{
"p": "topic",
"v": "",
"vt": "string"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 160,
"y": 80,
"wires": [
[
"0a79e7b4cbf4e1cb"
]
]
},
{
"id": "a67d205f48f957c7",
"type": "debug",
"z": "d17299e5.9ff148",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 590,
"y": 80,
"wires": []
}
]