From 48bf95b0831ea315fe88c3d58494bcbd112d0e4f Mon Sep 17 00:00:00 2001 From: Sebastian-Webster <84299475+Sebastian-Webster@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:46:38 +0400 Subject: [PATCH] fix grammar issue when arch option is incorrect --- src/constants.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 8ced887c..82a3624e 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -43,7 +43,7 @@ export function getInternalEnvVariable(envVar: keyof typeof internalOptions): st return process.env['mysqlmsn_internal_DO_NOT_USE_' + envVar] || internalOptions[envVar] } -const allowedArches = ['x64', 'arm64', undefined] +const allowedArches = ['x64', 'arm64'] export const OPTION_TYPE_CHECKS: OptionTypeChecks = { version: { check: (opt: any) => opt === undefined || typeof opt === 'string' && validSemver(coerceSemver(opt)) !== null, @@ -111,7 +111,7 @@ export const OPTION_TYPE_CHECKS: OptionTypeChecks = { definedType: 'string' }, arch: { - check: (opt: any) => allowedArches.includes(opt), + check: (opt: any) => opt === undefined || allowedArches.includes(opt), errorMessage: `Option arch must be either of the following: ${allowedArches.join(', ')}`, definedType: 'string' }