You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2016/09/15 23:45:47 UTC

ios commit: Undefined error

Repository: cordova-ios
Updated Branches:
  refs/heads/master f74e2de6a -> 0219d7cc5


Undefined error

runOptions.argv is only supplied by the CLI.

This proposed change will prevent issues for projects which call this library directly.

 This closes #255


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

Branch: refs/heads/master
Commit: 0219d7cc5f5bc322465d3a1c7e0d0a4d40dda658
Parents: f74e2de
Author: DaveByBox <da...@bybox.com>
Authored: Wed Sep 14 09:24:45 2016 +0100
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Sep 15 16:50:41 2016 -0700

----------------------------------------------------------------------
 bin/templates/scripts/cordova/lib/run.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/0219d7cc/bin/templates/scripts/cordova/lib/run.js
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/lib/run.js b/bin/templates/scripts/cordova/lib/run.js
index 7a97c99..68c315a 100644
--- a/bin/templates/scripts/cordova/lib/run.js
+++ b/bin/templates/scripts/cordova/lib/run.js
@@ -74,8 +74,12 @@ module.exports.run = function (runOptions) {
         if (useDevice) {
             return checkDeviceConnected().then(function () {
                 appPath = path.join(projectPath, 'build', 'device', projectName + '.app');
-                // argv.slice(2) removes node and run.js, filterSupportedArgs removes the run.js args
-                return deployToDevice(appPath, runOptions.target, filterSupportedArgs(runOptions.argv.slice(2)));
+                var extraArgs = [];
+                if (runOptions.argv) {
+                     // argv.slice(2) removes node and run.js, filterSupportedArgs removes the run.js args
+                     extraArgs = filterSupportedArgs(runOptions.argv.slice(2));
+                }
+                return deployToDevice(appPath, runOptions.target, extraArgs);
             }, function () {
                 // if device connection check failed use emulator then
                 return deployToSim(appPath, runOptions.target);


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