taco-team-build.js
function applyExecutionBitFix(platforms) {
    // Only bother if we're on OSX and are after platform add for iOS itself (still need to run for other platforms)
    if (process.platform !== "darwin" && process.platform !== 'linux') {
        return Q();
    }

    // Disable -E flag for non-OSX platforms
    var regex_flag = process.platform == 'darwin' ? '-E' : '';
    
    // Generate the script to set execute bits for installed platforms
    var script = "";
    platforms.forEach(function (platform) {
        var platformCordovaDir = "platforms/" + platform + "/cordova";

        if (utilities.fileExistsSync(platformCordovaDir)) {
            script += "find " + regex_flag + " " + platformCordovaDir + " -type f -regex \"[^.(LICENSE)]*\" -exec chmod +x {} +\n";
        }
    });

    var hooksCordovaDir = "hooks";
    if (utilities.fileExistsSync(hooksCordovaDir)) {
        script += "find " + regex_flag + " " + hooksCordovaDir + " -type f -exec chmod +x {} +\n";
    }

    script += "find " + regex_flag + " . -name '*.sh' -type f -exec chmod +x {} +\n";
    
    // Run script
    return exec(script);
}
function applyExecutionBitFix(platforms) {
    // Only bother if we're on OSX and are after platform add for iOS itself (still need to run for other platforms)
    if (process.platform !== "darwin" && process.platform !== 'linux') {
        return Q();
    }

    // Disable -E flag for non-OSX platforms
    var regex_flag = process.platform == 'darwin' ? '-E' : '';
    
    // Generate the script to set execute bits for installed platforms
    var script = "";
    platforms.forEach(function (platform) {
        var platformCordovaDir = "platforms/" + platform + "/cordova";

        if (utilities.fileExistsSync(platformCordovaDir)) {
            script += "find " + regex_flag + " " + platformCordovaDir + " -type f -regex \"[^.(LICENSE)]*\" -exec chmod +x {} +\n";
        }
    });

    var hooksCordovaDir = "hooks";
    if (utilities.fileExistsSync(hooksCordovaDir)) {
        script += "find " + regex_flag + " " + hooksCordovaDir + " -type f -exec chmod +x {} +\n";
    }

    script += "find " + regex_flag + " . -name '*.sh' -type f -exec chmod +x {} +\n";
    
    // Run script
    return exec(script);
}
function applyExecutionBitFix ( platforms ) { // Only bother if we're on OSX and are after platform add for iOS itself (still need to run for other platforms) if ( process . platform !== "darwin" && process . platform !== 'linux' ) { return Q ( ) ; } // Disable -E flag for non-OSX platforms var regex_flag = process . platform == 'darwin' ? '-E' : '' ; // Generate the script to set execute bits for installed platforms var script = "" ; platforms . forEach ( function ( platform ) { var platformCordovaDir = "platforms/" + platform + "/cordova" ; if ( utilities . fileExistsSync ( platformCordovaDir ) ) { script += "find " + regex_flag + " " + platformCordovaDir + " -type f -regex \"[^.(LICENSE)]*\" -exec chmod +x {} +\n" ; } } ) ; var hooksCordovaDir = "hooks" ; if ( utilities . fileExistsSync ( hooksCordovaDir ) ) { script += "find " + regex_flag + " " + hooksCordovaDir + " -type f -exec chmod +x {} +\n" ; } script += "find " + regex_flag + " . -name '*.sh' -type f -exec chmod +x {} +\n" ; // Run script return exec ( script ) ; }
It's possible that checking in the platforms folder on Windows and then checking out and building the project on OSX can cause the eXecution bit on the platform version files to be cleared, resulting in errors when performing project operations. This method restores it if needed. It will also set the excute bit on the hooks directory and all shell scripts in the project
It s possible that checking in the platforms folder on Windows and then checking out and building the project on OSX can cause the eXecution bit on the platform version files to be cleared resulting in errors when performing project operations . This method restores it if needed . It will also set the excute bit on the hooks directory and all shell scripts in the project