diff --git a/internal/tsoptions/commandlineparser.go b/internal/tsoptions/commandlineparser.go index bc229a46536..75a89b99cb9 100644 --- a/internal/tsoptions/commandlineparser.go +++ b/internal/tsoptions/commandlineparser.go @@ -163,6 +163,10 @@ func getInputOptionName(input string) string { } func (p *commandLineParser) parseResponseFile(fileName string) { + if fileName == "" { + p.errors = append(p.errors, ast.NewCompilerDiagnostic(diagnostics.Cannot_read_file_0, fileName)) + return + } fileContents, errors := tryReadFile(fileName, func(fileName string) (string, bool) { if p.fs == nil { return "", false