You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2016/06/02 11:41:13 UTC

[2/2] cordova-paramedic git commit: Add debug code to permission helper

Add debug code to permission helper


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

Branch: refs/heads/ci/ios
Commit: c2d40cb6deadc198a945e872f208c51a320a79cd
Parents: 8bdbec1
Author: Administrator <Ad...@medic-mbp.rp.ru>
Authored: Thu Jun 2 14:39:23 2016 +0300
Committer: Administrator <Ad...@medic-mbp.rp.ru>
Committed: Thu Jun 2 14:39:23 2016 +0300

----------------------------------------------------------------------
 lib/ParamediciOSPermissions.js | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-paramedic/blob/c2d40cb6/lib/ParamediciOSPermissions.js
----------------------------------------------------------------------
diff --git a/lib/ParamediciOSPermissions.js b/lib/ParamediciOSPermissions.js
index eca8d13..a716a86 100644
--- a/lib/ParamediciOSPermissions.js
+++ b/lib/ParamediciOSPermissions.js
@@ -59,14 +59,19 @@ ParamediciOSPermissions.prototype.updatePermissions = function (serviceList){
         // But, such a failure is intentionally not handled here.
         var proc = shelljs.exec(command, {silent: true, async: false});
         if (proc.code) {
+            logger.warn(proc.output);
             logger.warn('Failed to insert permissions for ' + this.appName + ' into ' + destinationTCCFile +
                 ' Will try to update existing permissions.');
 
             // (service, client, client_type, allowed, prompt_count, csreq)
-            command = nodeutil.format('sqlite3 %s "update access set client_type=0, allowed=1, prompt_count=1, csreq=NULL where service=\'%s\', and client=\'%s\'"', serviceList[i], this.appName);
+            command = nodeutil.format('sqlite3 %s "update access ' +
+                'set client_type=0, allowed=1, prompt_count=1, csreq=NULL ' +
+                'where service=\'%s\' and client=\'%s\'"', destinationTCCFile, serviceList[i], this.appName);
             logger.info('Running Command: ' + command);
             // Now we really don't care about the result as there is nothing we can do with this
-            if (shelljs.exec(command, {silent: true, async: false}).code) {
+            var patchProc = shelljs.exec(command, {silent: true, async: false});
+            if (patchProc.code) {
+                logger.warn(patchProc.output);
                 logger.warn('Failed to update existing permissions for ' + this.appName + ' into ' + destinationTCCFile +
                 ' Continuing anyway.');
             }


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