Cerulean-Circle-GmbH / once.sh

Unified shell environment for UCP components and ONCE the Object Network Communication Environment
GNU General Public License v3.0
3 stars 3 forks source link

LOG_DEVICE=/dev/stdout causes strange behavior #10

Open chrda81 opened 3 months ago

chrda81 commented 3 months ago

https://github.com/Cerulean-Circle-GmbH/once.sh/blob/a371068a460df5876f5fdfbcae0419b2f448d0c7/this#L12

If set to /dev/stdout the console.log() line config.save (CONFIG=/root/config/user.env) is written to stateMachines/SETUP_SERVER.states.env and causes state machine to fail:

/stateMachines/SETUP_SERVER.states.env: line 1: syntax error near unexpected token `CONFIG=/root/config/user.env'
/stateMachines/SETUP_SERVER.states.env: line 1: `config.save (CONFIG=/root/config/user.env)'
/root/oosh/state: line 901: SETUP_SERVER_STATES[]: invalid variable name

LOG_DEVICE=/dev/tty seems to work.

chrda81 commented 3 months ago

Fixed in https://github.com/Cerulean-Circle-GmbH/once.sh/pull/11/commits/fa05e67d38f524bf63f3728fd4c24fb628a9d191