diff options
Diffstat (limited to 'cli/js')
-rw-r--r-- | cli/js/runtime.ts | 11 | ||||
-rw-r--r-- | cli/js/runtime_main.ts | 7 |
2 files changed, 8 insertions, 10 deletions
diff --git a/cli/js/runtime.ts b/cli/js/runtime.ts index 8cebf5dca..53ce5fcee 100644 --- a/cli/js/runtime.ts +++ b/cli/js/runtime.ts @@ -13,8 +13,9 @@ import { setPrepareStackTrace } from "./error_stack.ts"; interface Start { cwd: string; pid: number; - argv: string[]; - mainModule: string; // Absolute URL. + args: string[]; + location: string; // Absolute URL. + repl: boolean; debugFlag: boolean; depsFlag: boolean; typesFlag: boolean; @@ -57,10 +58,8 @@ export function start(preserveDenoNamespace = true, source?: string): Start { util.setLogDebug(s.debugFlag, source); // TODO(bartlomieju): this field should always be set - if (s.mainModule) { - assert(s.mainModule.length > 0); - setLocation(s.mainModule); - } + assert(s.location.length > 0); + setLocation(s.location); setPrepareStackTrace(Error); // TODO(bartlomieju): I don't like that it's mixed in here, when diff --git a/cli/js/runtime_main.ts b/cli/js/runtime_main.ts index 2ede2e20f..b5517cbcb 100644 --- a/cli/js/runtime_main.ts +++ b/cli/js/runtime_main.ts @@ -72,14 +72,13 @@ export function bootstrapMainRuntime(): void { setSignals(); log("cwd", s.cwd); - for (let i = 0; i < s.argv.length; i++) { - args.push(s.argv[i]); + for (let i = 0; i < s.args.length; i++) { + args.push(s.args[i]); } log("args", args); Object.freeze(args); - // TODO(bartlomieju): rename to s.repl - if (!s.mainModule) { + if (s.repl) { replLoop(); } } |