Fix checking keys rather than values

This commit is contained in:
Michael B. Gale
2026-07-24 16:17:04 +01:00
parent 0953dc00da
commit f00f809405

View File

@@ -68,8 +68,8 @@ function main() {
strict: true,
});
for (const key of Object.keys(values)) {
if (key === undefined || key.trim() === "") {
for (const [key, val] of Object.entries(values)) {
if (val === undefined || val.trim() === "") {
throw new Error(`Argument '--${key}' is required.`);
}
}