File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/lib/plugins/run-code-blocks Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { ChildProcess , spawn } from 'child_process' ;
2
2
import { Option , assert } from 'ts-std' ;
3
+ import { stripVTControlCharacters } from 'node:util' ;
3
4
4
5
const WINDOWS = process . platform === 'win32' ;
5
6
@@ -121,7 +122,7 @@ export default class Server {
121
122
122
123
process . stdout . on ( 'data' , chunk => {
123
124
assert ( this . process === null || this . process === process , `this.process was reassigned` ) ;
124
- this . _stdout . push ( chunk ) ;
125
+ this . _stdout . push ( stripVTControlCharacters ( chunk . toString ( ) ) ) ;
125
126
126
127
if ( expect && this . status === Status . Starting ) {
127
128
if ( this . stdout ! . includes ( expect ) ) {
@@ -132,7 +133,7 @@ export default class Server {
132
133
133
134
process . stderr . on ( 'data' , chunk => {
134
135
assert ( this . process === null || this . process === process , `this.process was reassigned` ) ;
135
- this . _stderr . push ( chunk ) ;
136
+ this . _stderr . push ( stripVTControlCharacters ( chunk . toString ( ) ) ) ;
136
137
} ) ;
137
138
138
139
process . on ( 'exit' , ( code , signal ) => {
You can’t perform that action at this time.
0 commit comments