From 4c97ab8265e5a4fc640caecb5b8f2f502b4aa6ab Mon Sep 17 00:00:00 2001 From: Sukairo-02 Date: Thu, 25 Jul 2024 07:06:22 +0300 Subject: [PATCH] Fixed default positional enum error message --- package.json | 2 +- src/event-handler.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0416c96..b5e090b 100755 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@drizzle-team/brocli", "type": "module", "author": "Drizzle Team", - "version": "0.9.0", + "version": "0.9.1", "description": "Typed CLI command runner", "license": "Apache-2.0", "sideEffects": false, diff --git a/src/event-handler.ts b/src/event-handler.ts index fe2a6ae..b610095 100644 --- a/src/event-handler.ts +++ b/src/event-handler.ts @@ -256,7 +256,7 @@ export const defaultEventHandler: EventHandler = async (event) => { const values = option.enumVals!; msg = option.type === 'positional' - ? `Invalid value: value for the argument '${matchedName}' must be either one of the following: ${ + ? `Invalid value: value for the positional argument '${option.name}' must be either one of the following: ${ values.join(', ') }; Received: ${data}` : `Invalid value: value for the argument '${matchedName}' must be either one of the following: ${