You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sg...@apache.org on 2015/10/19 12:33:39 UTC

cordova-lib git commit: CB-9821 Fix EventEmitter incorrect trace level usages

Repository: cordova-lib
Updated Branches:
  refs/heads/master 2ef7f7667 -> 49be6e17a


CB-9821 Fix EventEmitter incorrect trace level usages

github close #325


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

Branch: refs/heads/master
Commit: 49be6e17ad9c57ce1ff6f6c1911b08fb22bc363f
Parents: 2ef7f76
Author: sgrebnov <v-...@microsoft.com>
Authored: Mon Oct 19 12:49:32 2015 +0300
Committer: sgrebnov <v-...@microsoft.com>
Committed: Mon Oct 19 13:33:31 2015 +0300

----------------------------------------------------------------------
 cordova-lib/src/hooks/HooksRunner.js   | 3 +--
 cordova-lib/src/hooks/scriptsFinder.js | 4 ++--
 cordova-lib/src/plugman/uninstall.js   | 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/49be6e17/cordova-lib/src/hooks/HooksRunner.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/hooks/HooksRunner.js b/cordova-lib/src/hooks/HooksRunner.js
index 498ee04..716156d 100644
--- a/cordova-lib/src/hooks/HooksRunner.js
+++ b/cordova-lib/src/hooks/HooksRunner.js
@@ -73,8 +73,7 @@ HooksRunner.prototype.prepareOptions = function(opts) {
     try {
         opts.cordova.version = opts.cordova.version || require('../../package').version;
     } catch(ex) {
-        events.emit('err', 'HooksRunner could not load package.json: ' + ex.message);
-        console.log('HooksRunner could not load package.json: ' + ex.message);
+        events.emit('error', 'HooksRunner could not load package.json: ' + ex.message);
     }
 
     return opts;

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/49be6e17/cordova-lib/src/hooks/scriptsFinder.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/hooks/scriptsFinder.js b/cordova-lib/src/hooks/scriptsFinder.js
index 4fe7f32..ae9cced 100644
--- a/cordova-lib/src/hooks/scriptsFinder.js
+++ b/cordova-lib/src/hooks/scriptsFinder.js
@@ -68,12 +68,12 @@ function getPluginsHookScripts(hook, opts) {
     // In case before_plugin_install, after_plugin_install, before_plugin_uninstall hooks we receive opts.plugin and
     // retrieve scripts exclusive for this plugin.
     if(opts.plugin) {
-        events.emit('debug', 'Executing "' + hook + '"  hook for "' + opts.plugin.id + '" on ' + opts.plugin.platform + '.');
+        events.emit('verbose', 'Executing "' + hook + '"  hook for "' + opts.plugin.id + '" on ' + opts.plugin.platform + '.');
         // if plugin hook is not run for specific platform then use all available platforms
         return getPluginScriptFiles(opts.plugin, hook, opts.plugin.platform  ? [opts.plugin.platform] : opts.cordova.platforms);
     }
 
-    events.emit('debug', 'Executing "' + hook + '"  hook for all plugins.');
+    events.emit('verbose', 'Executing "' + hook + '"  hook for all plugins.');
     return getAllPluginsHookScriptFiles(hook, opts);
 }
 

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/49be6e17/cordova-lib/src/plugman/uninstall.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/uninstall.js b/cordova-lib/src/plugman/uninstall.js
index e4565fe..a46b07b 100644
--- a/cordova-lib/src/plugman/uninstall.js
+++ b/cordova-lib/src/plugman/uninstall.js
@@ -249,7 +249,7 @@ function runUninstallPlatform(actions, platform, project_dir, plugin_dir, plugin
     if(options.is_top_level && dependents && dependents.length > 0) {
         var msg = 'The plugin \'' + plugin_id + '\' is required by (' + dependents.join(', ') + ')';
         if(options.force) {
-            events.emit('info', msg + ' but forcing removal');
+            events.emit('warn', msg + ' but forcing removal');
         } else {
             return Q.reject( new CordovaError(msg + ', skipping uninstallation.') );
         }


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