-
Notifications
You must be signed in to change notification settings - Fork 303
Closed as not planned
Description
Syndrome
On windows after spawn the terminal color are not displayed well.
- Node.js Version: v12.19.0
- OS: windows 10
- Scope (install, code, runtime, meta, other?): runtime
- Module (and version) (if relevant): spawn
✔ The first colored line display well but after the spawn
✖ The second colored line wrong
const { spawn } = require('child_process');
async function test() {
console.log('\x1b[36m%s\x1b[0m', 'I am cyan');
await run('echo Hello world!');
console.log('\x1b[36m%s\x1b[0m', 'I am cyan');
async function run(scrpt) {
const cmd = spawn('bash', ['-c', scrpt], { stdio: 'inherit' });
return new Promise((resolve) => {
cmd.on('close', (code) => resolve(code));
});
}
}
test();- Cygwin is installed
- bash is available on the path
Anybody knows what is wrong with this code?
Thank you!
Metadata
Metadata
Assignees
Labels
No labels
