Skip to content

Commit 62cc2e5

Browse files
Error in tsgo on positional args (microsoft#418)
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
1 parent 1a020be commit 62cc2e5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/tsgo/main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ func parseArgs() *cliOptions {
112112
flag.StringVar(&opts.devel.pprofDir, "pprofDir", "", "Generate pprof CPU/memory profiles to the given directory.")
113113
flag.Parse()
114114

115+
if len(flag.Args()) > 0 {
116+
fmt.Fprintf(os.Stderr, "Unknown positional arguments %v. Current compiler is not identical to tsc but can be partially emulated by running:\n\ntsgo tsc <args>\n", flag.Args())
117+
os.Exit(1)
118+
}
119+
115120
return opts
116121
}
117122

0 commit comments

Comments
 (0)