From fbe9d7b01f07b9cf1be693fbad30694115f8e417 Mon Sep 17 00:00:00 2001 From: Tlntin Date: Sat, 24 Dec 2022 12:14:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0Linux=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E5=8C=85=E5=90=8D=E6=AD=A3=E5=88=99=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/builders/common.ts | 2 +- dist/cli.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/builders/common.ts b/bin/builders/common.ts index d2819d8..47e060e 100644 --- a/bin/builders/common.ts +++ b/bin/builders/common.ts @@ -40,7 +40,7 @@ export async function mergeTauriConfig( // Package name is valid ? // for Linux, package name must be a-z, 0-9 or "-", not allow to A-Z and other if (process.platform === "linux") { - const reg = new RegExp("/[0-9]*[a-z]+[0-9]*\-?[0-9]*[a-z]*[0-9]*\-?[0-9]*[a-z]*[0-9]*/"); + const reg = new RegExp(/[0-9]*[a-z]+[0-9]*\-?[0-9]*[a-z]*[0-9]*\-?[0-9]*[a-z]*[0-9]*/); if (!reg.test(name)) { logger.error("package name is illegal, it must be lowercase, numbers, dashes.") logger.error("E.g com-123-xxx, 123pan, pan123,weread, we-read"); diff --git a/dist/cli.js b/dist/cli.js index 09f4e5b..3b4b3ce 100644 --- a/dist/cli.js +++ b/dist/cli.js @@ -1635,7 +1635,7 @@ function mergeTauriConfig(url, options, tauriConf) { // Package name is valid ? // for Linux, package name must be a-z, 0-9 or "-", not allow to A-Z and other if (process.platform === "linux") { - const reg = new RegExp("/[0-9]*[a-z]+[0-9]*\-?[0-9]*[a-z]*[0-9]*\-?[0-9]*[a-z]*[0-9]*/"); + const reg = new RegExp(/[0-9]*[a-z]+[0-9]*\-?[0-9]*[a-z]*[0-9]*\-?[0-9]*[a-z]*[0-9]*/); if (!reg.test(name)) { logger.error("package name is illegal, it must be lowercase, numbers, dashes."); logger.error("E.g com-123-xxx, 123pan, pan123,weread, we-read");