From 2e6dcf06817996863cdce0cfd69874b10a26f998 Mon Sep 17 00:00:00 2001 From: Whitewater Date: Thu, 6 Jun 2024 17:23:34 +0800 Subject: [PATCH] fix: expand the matching range of regex Co-authored-by: Asuka Minato Co-authored-by: OverflowCat --- packages/rtk-query-codegen-openapi/src/bin/cli.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rtk-query-codegen-openapi/src/bin/cli.ts b/packages/rtk-query-codegen-openapi/src/bin/cli.ts index ef70b73a96..d3650416df 100644 --- a/packages/rtk-query-codegen-openapi/src/bin/cli.ts +++ b/packages/rtk-query-codegen-openapi/src/bin/cli.ts @@ -38,7 +38,7 @@ const configFile = program.args[0]; if (program.args.length === 0 || !/\.(c?(jsx?|tsx?)|jsonc?)?$/.test(configFile)) { program.help(); } else { - if (/\.tsx?$/.test(configFile) && !ts) { + if (/\.[mc]?tsx?$/.test(configFile) && !ts) { console.error('Encountered a TypeScript configfile, but neither esbuild-runner nor ts-node are installed.'); process.exit(1); }