You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by lo...@apache.org on 2014/08/21 20:23:13 UTC

[12/15] git commit: proper order of initializers, which indicates a bigger problem

proper order of initializers, which indicates a bigger problem


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

Branch: refs/heads/master
Commit: 1f5173c44c866a524e01480628e2b06245cee78f
Parents: a4d941f
Author: Lorin Beer <lo...@gmail.com>
Authored: Wed Aug 20 18:38:13 2014 -0700
Committer: Lorin Beer <lo...@gmail.com>
Committed: Wed Aug 20 18:38:13 2014 -0700

----------------------------------------------------------------------
 src/cli.js | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/1f5173c4/src/cli.js
----------------------------------------------------------------------
diff --git a/src/cli.js b/src/cli.js
index 402aefb..a0ccc11 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -60,8 +60,6 @@ function init() {
  * set up event handlers for logging and results emitted as events.
  */
 function initLogHandlers(args) {
-    
-    init();
 
     cordova.on('results', console.log);
 
@@ -81,7 +79,6 @@ function initVerboseHandlers() {
         cordova.on('verbose', console.log);
         plugman.on('verbose', console.log);
     }
-
 };
 
 
@@ -118,14 +115,16 @@ function cli(inputArgs) {
         , 'src' : '--copy-from'
         };
 
-    init();
-
     // If no inputArgs given, use process.argv.
     inputArgs = inputArgs || process.argv
 
+    init();
+    initLogHandlers(inputArgs);
+
+
+
     var args = nopt(knownOpts, shortHands, inputArgs)
 
-    initLogHandlers(args);
 
     if (args.version) {
         console.log( require('../package').version );