I'm trying to set enviroment variable with js api
await fs.exec('adb', ['devices', '-l'], {
'HOME': '/root/.coder_home/tmp'
}
Result is PermissionError: Permission denied
my acl.d
{
"luci-app-example": {
"description": "Grant access to luci-app-example",
"read": {
"file": {
"/usr/bin/adb": [ "exec" ],
},
}
}
With this command
await fs.exec('adb', ['devices', '-l'])
is work, but i need set environment variable HOME
For reference:
Update:
after trying some command, using
await fs.exec('/usr/bin/env', ['HOME=/root','/usr/bin/adb', 'devices', '-l']);
is work, but why cant set env with fs.exec, even with empty object the result always permisson denied
await fs.exec('/usr/bin/env', ['TEST=X'],{});