Github user sarangan12 commented on a diff in the pull request:

    https://github.com/apache/cordova-medic/pull/94#discussion_r60300760
  
    --- Diff: lib/medicPermissions.js ---
    @@ -0,0 +1,63 @@
    +#!/usr/bin/env node
    +
    +/* jshint node: true */
    +var path    = require('path');
    +var fs              = require('fs');
    +var shelljs  = require("shelljs");
    +//var logger  = require('./utils').logger;
    +var util     = require("./util");
    +
    +function MedicPermissions(appName, simulatorsFolder, tccDbPath) {
    +   this.appName = appName;
    +   this.simulatorsFolder = simulatorsFolder;
    +   this.tccDbPath = tccDbPath;
    +}
    +
    +MedicPermissions.prototype.updatePermissions = function(serviceList) {
    --- End diff --
    
    Though this will work, you could modify the logic as
    
    1. Check for existence of TCC.db file. If not copy an empty file. 
    2. Do the insert command. 
    
    This will simplify the logic. Refer my latest paramedic PR for details. 
Also, you could reuse the same logic for finding simId instead of copying it 
for all simulators. 
    
    Also, minor code changes for running the command is required. Refer latest 
paramedic PR for details


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to