File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ import {
2626 minimist ,
2727 fs ,
2828} from './index.js'
29- import { startRepl } from './repl.js'
3029import { randomId } from './util.js'
3130import { installDeps , parseDeps } from './deps.js'
3231
@@ -77,7 +76,7 @@ await (async function main() {
7776 return
7877 }
7978 if ( argv . repl ) {
80- startRepl ( )
79+ await ( await import ( './repl.js' ) ) . startRepl ( )
8180 return
8281 }
8382 if ( argv . eval ) {
Original file line number Diff line number Diff line change 8484 defaults . quote = quote
8585} catch ( err ) {
8686 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+ }
8993 }
9094}
9195
Original file line number Diff line number Diff line change 1414
1515import os from 'node:os'
1616import path from 'node:path'
17- import repl from 'node:repl'
1817import { inspect } from 'node:util'
1918import { ProcessOutput , defaults } from './core.js'
2019import { chalk } from './vendor.js'
2120
22- export function startRepl ( ) {
21+ export async function startRepl ( ) {
2322 defaults . verbose = false
24- const r = repl . start ( {
23+ const r = ( await import ( 'node: repl' ) ) . start ( {
2524 prompt : chalk . greenBright . bold ( '❯ ' ) ,
2625 useGlobal : true ,
2726 preview : false ,
You can’t perform that action at this time.
0 commit comments