-
Notifications
You must be signed in to change notification settings - Fork 134
Description
I am working on purescript-blessed wrapper and with current spago, at least when I run it from spago run, the process is not a TTY anymore.
Spago version: 0.93.42
Spago-legacy version: 0.21.0.
I have some FFI code with calls to chjj/blessed (or kenan238/reblessed to be precise, which is the fixed modern version) and the terminal launched is just 1x1 char in size. Through debugging, I discovered that process.stdout.isTTY is not true anymore (while with spago-legacy it was), and both process.stdout.columns and process.stdout.rows are undefined.
For now, I have a forced workaround to this:
function ensureTTY() {
if (!process.stdout.isTTY) {
const {columns, rows} = terminalSize();
process.stdout.isTTY = true;
process.stdout.columns = columns;
process.stdout.rows = rows;
}
}
I run my code with spago run --quiet --censor-stats to avoid all the output.
Fair to say, blessed provides the API to spawn program with the custom configured terminal/tput, but this functionality is not yet wrapped.
Side-note: Since blessed and reblessed are still all CommonJS, I am failing to bundle it to ES modules easily.
If needed, I can manage to create some lib-independent demo for the issue.