增加Linux平台包名正则验证
This commit is contained in:
2
dist/cli.js
vendored
2
dist/cli.js
vendored
@@ -1636,7 +1636,7 @@ function mergeTauriConfig(url, options, tauriConf) {
|
||||
// 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]*/);
|
||||
if (!reg.test(name)) {
|
||||
if (!reg.test(name) || reg.exec(name)[0].length != name.length) {
|
||||
logger.error("package name is illegal, it must be lowercase, numbers, dashes.");
|
||||
logger.error("E.g com-123-xxx, 123pan, pan123,weread, we-read");
|
||||
process.exit();
|
||||
|
||||
Reference in New Issue
Block a user