Skip to content

Commit

Permalink
Output current package name if package name can't be validated (apach…
Browse files Browse the repository at this point in the history
…e#567)

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.
  • Loading branch information
Jan Piotrowski authored and Christopher J. Brody committed Nov 22, 2018
1 parent 5a5f544 commit f2d7005
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/lib/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f2d7005

Please sign in to comment.