File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22
33import process from 'node:process' ;
4- import { createRequire } from 'node:module' ;
54import { promisify } from 'node:util' ;
65import { tryToCatch } from 'try-to-catch' ;
76import parse from 'yargs-parser' ;
@@ -15,7 +14,6 @@ import Info from '../package.json' with {
1514} ;
1615
1716process . on ( 'unhandledRejection' , exit ) ;
18- const require = createRequire ( import . meta. url ) ;
1917
2018const isUndefined = ( a ) => typeof a === 'undefined' ;
2119
@@ -30,8 +28,6 @@ const config = createConfig({
3028 configPath,
3129} ) ;
3230
33- const DIR_SERVER = '../server/' ;
34-
3531const maybeRoot = ( a ) => {
3632 if ( a === '.' )
3733 return process . cwd ( ) ;
@@ -180,7 +176,7 @@ async function main() {
180176 return exit ( error ) ;
181177
182178 if ( args . repl )
183- repl ( ) ;
179+ await repl ( ) ;
184180
185181 validate . columns ( args . columns ) ;
186182 validate . theme ( args . theme ) ;
@@ -339,9 +335,9 @@ async function help() {
339335 console . log ( '\nGeneral help using Cloud Commander: <%s>' , url ) ;
340336}
341337
342- function repl ( ) {
338+ async function repl ( ) {
343339 console . log ( 'REPL mode enabled (telnet localhost 1337)' ) ;
344- require ( ` ${ DIR_SERVER } repl` ) ;
340+ await import ( '../server/ repl.js' ) ;
345341}
346342
347343async function checkUpdate ( ) {
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ RUN apt-get update && apt-get upgrade && apt-get autoremove && \
3737 echo " set editing-mode vi" >> / etc/ inputrc && \
3838 echo " TAB: menu-complete" >> / etc/ inputrc && \
3939 echo " set UTF-8" && \
40- echo" > configure languages" && \
40+ echo " > configure languages" && \
4141 echo " en_US.UTF-8 UTF-8" > / etc/ locale.gen && \
4242 echo " ru_RU.UTF-8 UTF-8" >> / etc/ locale.gen && \
4343 echo " uk_UA.UTF-8 UTF-8" >> / etc/ locale.gen && \
You can’t perform that action at this time.
0 commit comments