Skip to content

Commit e777b88

Browse files
committed
Allow luaEntry to be specified via command line
1 parent 635ba3b commit e777b88

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

src/CommandLineParser.ts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,6 @@ function readCommandLineArgument(option: CommandLineOption, value: any): Command
194194
};
195195
}
196196

197-
if (option.type === 'string[]') {
198-
return {
199-
error: diagnosticFactories.optionCanOnlyBeSpecifiedInTsconfigJsonFile(option.name),
200-
value: undefined,
201-
increment: 0
202-
};
203-
}
204-
205197
return { ...readValue(option, value), increment: 1 };
206198
}
207199

@@ -257,10 +249,14 @@ function readValue(option: CommandLineOption, value: unknown): ReadValueResult {
257249
return { value };
258250
}
259251

260-
return {
261-
value: undefined,
262-
error: diagnosticFactories.invalidStringArrayForOption(option.name),
263-
};
252+
if (typeof value !== "string") {
253+
return {
254+
value: undefined,
255+
error: diagnosticFactories.compilerOptionRequiresAValueOfType(option.name, "string"),
256+
};
257+
}
258+
259+
return { value: [value] };
264260
}
265261
}
266262
}

0 commit comments

Comments
 (0)