Recently I encountered an issue where if I enter a wrong command in CLI then an error message doesn't appear. But if I execute the right command I will see the error message from the previous command and the output for the next executed command. So it looks like the next valid command pushes out the error message.
I suspect that the method clicon_parse(...) from clicon_parse has an issue. If we run the clixon CLI with parameter "-l o" it means that inside the clicon_parse all error messages will be written in stdout. It's causing the issue because stdout is buffered, unlike stderr.
Should we use the fflush(f) call for the selected stream at the end of the clicon_parse method?
Also because the method chooses where to write the error messages (in stderr or in stdout) some parts continue to use stderr invariably. Is it a mistake or not?
Recently I encountered an issue where if I enter a wrong command in CLI then an error message doesn't appear. But if I execute the right command I will see the error message from the previous command and the output for the next executed command. So it looks like the next valid command pushes out the error message. I suspect that the method clicon_parse(...) from clicon_parse has an issue. If we run the clixon CLI with parameter "-l o" it means that inside the clicon_parse all error messages will be written in stdout. It's causing the issue because stdout is buffered, unlike stderr. Should we use the fflush(f) call for the selected stream at the end of the clicon_parse method?
Also because the method chooses where to write the error messages (in stderr or in stdout) some parts continue to use stderr invariably. Is it a mistake or not?