File tree 3 files changed +9
-7
lines changed
3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ import {
26
26
minimist ,
27
27
fs ,
28
28
} from './index.js'
29
- import { startRepl } from './repl.js'
30
29
import { randomId } from './util.js'
31
30
import { installDeps , parseDeps } from './deps.js'
32
31
@@ -77,7 +76,7 @@ await (async function main() {
77
76
return
78
77
}
79
78
if ( argv . repl ) {
80
- startRepl ( )
79
+ await ( await import ( './repl.js' ) ) . startRepl ( )
81
80
return
82
81
}
83
82
if ( argv . eval ) {
Original file line number Diff line number Diff line change 84
84
defaults . quote = quote
85
85
} catch ( err ) {
86
86
if ( process . platform == 'win32' ) {
87
- defaults . shell = which . sync ( 'powershell.exe' )
88
- defaults . quote = quotePowerShell
87
+ try {
88
+ defaults . shell = which . sync ( 'powershell.exe' )
89
+ defaults . quote = quotePowerShell
90
+ } catch ( err ) {
91
+ // no powershell?
92
+ }
89
93
}
90
94
}
91
95
Original file line number Diff line number Diff line change 14
14
15
15
import os from 'node:os'
16
16
import path from 'node:path'
17
- import repl from 'node:repl'
18
17
import { inspect } from 'node:util'
19
18
import { ProcessOutput , defaults } from './core.js'
20
19
import { chalk } from './vendor.js'
21
20
22
- export function startRepl ( ) {
21
+ export async function startRepl ( ) {
23
22
defaults . verbose = false
24
- const r = repl . start ( {
23
+ const r = ( await import ( 'node: repl' ) ) . start ( {
25
24
prompt : chalk . greenBright . bold ( '❯ ' ) ,
26
25
useGlobal : true ,
27
26
preview : false ,
You can’t perform that action at this time.
0 commit comments