Closed guyappy closed 11 months ago
Hi,
Since the lib write to stdout, if console.log()
can write to the log, term.table()
should as well.
If not, then something is wrong on the Azure end.
Thanks for the response!
I added the console.table command to check this;
console.log(`rows length: ${rows.length}`)
console.log(`rows: ${JSON.stringify(rows)}`)
console.table(rows);
term.table( rows , {
hasBorder: true ,
contentHasMarkup: true ,
borderChars: 'lightRounded' ,
borderAttr: { color: 'blue' } ,
// textAttr: { bgColor: 'default' } ,
// firstCellTextAttr: { bgColor: 'blue' } ,
firstRowTextAttr: { bgColor: 'blue', } ,
// firstColumnTextAttr: { bgColor: 'red' } ,
width: 160
});
output on Azure is:
@cronvel can this one please be opened?
As of version 3.0.1, your bug should be mostly fixed.
Also note that the lib is intended for creating rich terminal application, not to log things, you are probably using the wrong tool here. For example you will not have colors.
For your information, interacting with a terminal is done by sending it escape sequence, that are not always compatible between terminals, there is no standard way. Without a terminal, assuming we are writing to a file for some human to read that later, all escape sequences are striped, so no color, no fancy style, and so on.
By the way, avoid duplicating issues on purpose, that's just annoying.
Thank you for the fix, now it works indeed!
I understand duplicating issues is annoying but this issue was simply closed without it being resolved and I did not get a reply anymore so I thought you had a filter on issues that are open only, hence I recreated. that makes sense, no?
No problem, have a nice day.
Hi all,
I'm running the following command in an Azure DevOps pipeline:
This triggers the index.js to print the following table eventually which works fine on my local (Windows) machine:
input;
However, in the Azure DevOps pipeine it does not show anything in the logs. The rows.length result in shown in the below screenshot and I copied the output (the array) and put that above in the code block which works locally.