summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/main.go b/main.go
index ce96c1e7f..7da8cfd07 100644
--- a/main.go
+++ b/main.go
@@ -4,6 +4,7 @@ package deno
import (
"flag"
+ "fmt"
"github.com/ry/v8worker2"
"os"
"runtime/pprof"
@@ -69,6 +70,12 @@ var main_map string
func Init() {
workerArgs = FlagsParse()
+ if len(workerArgs) == 0 {
+ fmt.Fprintf(os.Stderr, "Usage: %s file.ts\n", os.Args[0])
+ flag.PrintDefaults()
+ os.Exit(1)
+ }
+
// Maybe start Golang CPU profiler.
// Use --prof for profiling JS.
if *flagGoProf != "" {