cli: allow empty create option values

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-11-12 15:33:45 +01:00
parent 602cf4d80d
commit 248c8eaa25
+1 -1
View File
@@ -29,7 +29,7 @@ function parseOptions(optionStrings: string[]): Record<string, string> {
for (const str of optionStrings) {
const [key] = str.split('=', 1);
const value = str.slice(key.length + 1);
if (!key || !value) {
if (!key || str[key.length] !== '=') {
throw new Error(
`Invalid option '${str}', must be of the format <key>=<value>`,
);