You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2018/11/20 17:03:12 UTC

[cordova-android] 01/01: Out current package name if package name can't be validated

This is an automated email from the ASF dual-hosted git repository.

janpio pushed a commit to branch janpio-patch-1
in repository https://gitbox.apache.org/repos/asf/cordova-android.git

commit 340da21e732af3dc18c79566a1a9ee68f0ef6dca
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Tue Nov 20 18:03:05 2018 +0100

    Out current package name if package name can't be validated
    
    We have this of the package name. It only outputs that the current one is bad, not what the current one actually is. Added an output of the current one to the error.
---
 bin/lib/create.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/lib/create.js b/bin/lib/create.js
index af0d298..307808c 100755
--- a/bin/lib/create.js
+++ b/bin/lib/create.js
@@ -194,7 +194,7 @@ function validatePackageName (package_name) {
     var msg = 'Error validating package name. ';
 
     if (!/^[a-zA-Z][a-zA-Z0-9_]+(\.[a-zA-Z][a-zA-Z0-9_]*)+$/.test(package_name)) {
-        return Q.reject(new CordovaError(msg + 'Package name must look like: com.company.Name'));
+        return Q.reject(new CordovaError(msg + 'Must look like: `com.company.Name`. Currently is: `' + package_name + '`' ));
     }
 
     // Class is a reserved word


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org