summaryrefslogtreecommitdiff
path: root/cli/js/runtime.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-02-04 20:24:33 +0100
committerGitHub <noreply@github.com>2020-02-04 20:24:33 +0100
commit184be99f5b6e85a6041e72dfdd0afda46e5f8619 (patch)
treed438f3ab106d4a515cf05a296a31db206c266d80 /cli/js/runtime.ts
parent2ab49a80a62f00e5540907d6d85cf15a9cce070e (diff)
refactor: CLI subcommands and argv (#3886)
Diffstat (limited to 'cli/js/runtime.ts')
-rw-r--r--cli/js/runtime.ts11
1 files changed, 5 insertions, 6 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