summaryrefslogtreecommitdiff
path: root/js/main.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/main.ts')
-rw-r--r--js/main.ts13
1 files changed, 7 insertions, 6 deletions
diff --git a/js/main.ts b/js/main.ts
index 50de2c26c..0ed45aaec 100644
--- a/js/main.ts
+++ b/js/main.ts
@@ -8,6 +8,7 @@ import { libdeno } from "./libdeno";
import { args } from "./deno";
import { sendSync, handleAsyncMsgFromRust } from "./dispatch";
import { promiseErrorExaminer, promiseRejectHandler } from "./promise_util";
+import { replLoop } from "./repl";
import { version } from "typescript";
function sendStart(): msg.StartRes {
@@ -77,13 +78,13 @@ export default function denoMain() {
}
log("args", args);
Object.freeze(args);
-
const inputFn = args[0];
- if (!inputFn) {
- console.log("No input script specified.");
- os.exit(1);
- }
compiler.recompile = startResMsg.recompileFlag();
- compiler.run(inputFn, `${cwd}/`);
+
+ if (inputFn) {
+ compiler.run(inputFn, `${cwd}/`);
+ } else {
+ replLoop();
+ }
}