cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhigg...@apache.org
Subject git commit: CB-6338 Improve error for missing template
Date Mon, 24 Mar 2014 19:42:31 GMT
Repository: cordova-cli
Updated Branches:
  refs/heads/master bd108d59b -> edecaf919


CB-6338 Improve error for missing template


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/edecaf91
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/edecaf91
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/edecaf91

Branch: refs/heads/master
Commit: edecaf9193e8b23c6b7e209c6893491497021082
Parents: bd108d5
Author: Josh Soref <jsoref@blackberry.com>
Authored: Mon Mar 24 14:30:14 2014 -0400
Committer: Bryan Higgins <bhiggins@blackberry.com>
Committed: Mon Mar 24 15:41:00 2014 -0400

----------------------------------------------------------------------
 src/create.js | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/edecaf91/src/create.js
----------------------------------------------------------------------
diff --git a/src/create.js b/src/create.js
index 26798ab..d0c1450 100644
--- a/src/create.js
+++ b/src/create.js
@@ -124,6 +124,9 @@ module.exports = function create (dir, id, name, cfg, callback) {
     }
 
     ret = p.then(function(www_lib) {
+        if (!fs.existsSync(www_lib)) {
+            throw new CordovaError('Could not find directory: '+www_lib);
+        }
         // Keep going into child "www" folder if exists in stock app package.
         while (fs.existsSync(path.join(www_lib, 'www'))) {
             www_lib = path.join(www_lib, 'www');


Mime
View raw message