Skip to content

Commit b8eee68

Browse files
committed
LuaJIT target in help now is uppercased
1 parent bd7dcd5 commit b8eee68

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/CommandLineParser.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,16 +211,16 @@ function readValue(option: CommandLineOption, value: unknown): ReadValueResult {
211211
};
212212
}
213213

214-
const normalizedValue = value.toLowerCase();
215-
if (option.choices && !option.choices.includes(normalizedValue)) {
214+
const enumValue = option.choices.find(c => c.toLowerCase() === value.toLowerCase());
215+
if (enumValue === undefined) {
216216
const optionChoices = option.choices.join(", ");
217217
return {
218218
value: undefined,
219219
error: diagnostics.argumentForOptionMustBe(`--${option.name}`, optionChoices),
220220
};
221221
}
222222

223-
return { value: normalizedValue };
223+
return { value: enumValue };
224224
}
225225
}
226226
}

src/CompilerOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ export enum LuaTarget {
1919
Lua51 = "5.1",
2020
Lua52 = "5.2",
2121
Lua53 = "5.3",
22-
LuaJIT = "jit",
22+
LuaJIT = "JIT",
2323
}

0 commit comments

Comments
 (0)