File tree 2 files changed +4
-7
lines changed
2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 14
14
15
15
import assert from 'node:assert'
16
16
import { createInterface } from 'node:readline'
17
- import process from 'node:process'
18
17
import { $ , within , ProcessOutput } from './core.js'
19
18
import {
20
19
type Duration ,
@@ -25,10 +24,10 @@ import {
25
24
toCamelCase ,
26
25
} from './util.js'
27
26
import {
28
- minimist ,
29
- nodeFetch ,
30
27
type RequestInfo ,
31
28
type RequestInit ,
29
+ nodeFetch ,
30
+ minimist ,
32
31
} from './vendor.js'
33
32
34
33
export { default as path } from 'node:path'
@@ -83,9 +82,7 @@ export function echo(pieces: TemplateStringsArray, ...args: any[]) {
83
82
}
84
83
85
84
function stringify ( arg : ProcessOutput | any ) {
86
- return arg instanceof ProcessOutput
87
- ? arg . toString ( ) . replace ( / \n $ / , '' )
88
- : `${ arg } `
85
+ return arg instanceof ProcessOutput ? arg . toString ( ) . trimEnd ( ) : `${ arg } `
89
86
}
90
87
91
88
export async function question (
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export async function startRepl(history = HISTORY) {
30
30
preview : false ,
31
31
writer ( output : any ) {
32
32
return output instanceof ProcessOutput
33
- ? output . toString ( ) . replace ( / \n $ / , '' )
33
+ ? output . toString ( ) . trimEnd ( )
34
34
: inspect ( output , { colors : true } )
35
35
} ,
36
36
} )
You can’t perform that action at this time.
0 commit comments