From f995262d4ac54f5ca8ec685c5bfa4984c8a6486b Mon Sep 17 00:00:00 2001 From: Govorunb Date: Sun, 16 Jun 2024 02:37:37 +1000 Subject: [PATCH] disable specific enum values --- ebs/src/modules/transactions.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ebs/src/modules/transactions.ts b/ebs/src/modules/transactions.ts index 153baae..70c930c 100644 --- a/ebs/src/modules/transactions.ts +++ b/ebs/src/modules/transactions.ts @@ -377,6 +377,9 @@ function validateArgs(config: Config, cart: Cart, logContext: LogMessage): strin if (parsed < 0 || parsed >= argEnum.length) { return `Enum value ${value} (for enum ${arg.type}) out of range`; } + if (argEnum[parsed].startsWith("[DISABLED]")) { + return `Enum value ${value} (for enum ${arg.type}) is disabled`; + } break; } }