diff options
Diffstat (limited to 'deno2/main.cc')
-rw-r--r-- | deno2/main.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/deno2/main.cc b/deno2/main.cc index d16dd44ba..4ea843bbb 100644 --- a/deno2/main.cc +++ b/deno2/main.cc @@ -9,9 +9,10 @@ int main(int argc, char** argv) { deno_init(); Deno* d = deno_new(NULL, NULL); - int r = deno_load(d, "main2.js", "foo();"); - if (r != 0) { + bool r = deno_execute(d, "deno_main.js", "denoMain();"); + if (!r) { printf("Error! %s\n", deno_last_exception(d)); exit(1); } + deno_dispose(d); } |