CB-7731 catch obvious missing args error

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

Branch: refs/heads/master
Commit: 29457595f997a2900aa2eb9e67fdab6c674b061a
Parents: c92ef05
Author: Jesse MacFadyen <[email protected]>
Authored: Tue Oct 7 17:29:58 2014 -0700
Committer: Jesse MacFadyen <[email protected]>
Committed: Tue Oct 7 17:29:58 2014 -0700

----------------------------------------------------------------------
 bin/lib/create.js | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/29457595/bin/lib/create.js
----------------------------------------------------------------------
diff --git a/bin/lib/create.js b/bin/lib/create.js
index 4faeee5..49733c1 100644
--- a/bin/lib/create.js
+++ b/bin/lib/create.js
@@ -30,6 +30,10 @@ module.exports.run = function (argv) {
     // Parse args
     var args = nopt({"guid": String}, {}, argv);
 
+    if(!args.argv.remain.length) {
+        return Q.reject("No path specified.");
+    }
+
     // Set parameters/defaults for create
     var projectPath = args.argv.remain[0];
     if (fs.existsSync(projectPath)){


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to