So trying to fix this issue I found that in this line of term-size
stops the execution:
const size = execa.sync('resize', ['-u']).stdout.match(/\d+/g);
With the vendor/resize
binary, execute a script:
#!/usr/bin/env node
const path = require('path')
const execa = require('execa')
const size = execa.shellSync(path.join(__dirname, 'resize'), ['-u']).stdout.match(/\d+/g)
console.log(size)
And executing like this:
$ ./index.js >log.txt 2>&1 &
[2] 15736
[2] + 15736 suspended (tty output) ./index.js > log.txt 2>&1
$ cat log.txt
$
This doesn't happen when you don't run the process in the background (so, without the last &
):
$ ./index.js >log.txt 2>&1
$ cat log.txt
[ '111', '25' ]
$
This could be an error in execa
or in the resize
binary, I have no clue.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too