mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-04 00:02:03 +08:00
CB-8735: Fixing the regex so that it's more compliant with Java package rules
This commit is contained in:
@@ -149,7 +149,7 @@ function copyScripts(projectPath) {
|
||||
function validatePackageName(package_name) {
|
||||
//Make the package conform to Java package types
|
||||
//Enforce underscore limitation
|
||||
if (!/^[a-zA-Z]+(\.[a-zA-Z0-9][a-zA-Z0-9_]*)+$/.test(package_name)) {
|
||||
if (!/^[a-zA-Z][a-zA-Z0-9_]+(\.[a-zA-Z][a-zA-Z0-9_]*)+$/.test(package_name)) {
|
||||
return Q.reject('Package name must look like: com.company.Name');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user