Skip to content

Commit

Permalink
Check OS
Browse files Browse the repository at this point in the history
Checks if the OS is OSX (Darwin) before executing the hook
  • Loading branch information
Nicolas Naso authored Mar 16, 2018
1 parent 59f35d1 commit 3ba36e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/after_plugin_add.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

var iosHelper = require("./lib/ios-helper");
var utilities = require("./lib/utilities");
var os = require('os');

module.exports = function(context) {

var platforms = context.opts.cordova.platforms;

// Add a build phase which runs a shell script that executes the Crashlytics
// run command line tool which uploads the debug symbols at build time.
if (platforms.indexOf("ios") !== -1) {
if (platforms.indexOf("ios") !== -1 && os.platform() === 'darwin') {
var xcodeProjectPath = utilities.getXcodeProjectPath(context);
iosHelper.removeShellScriptBuildPhase(context, xcodeProjectPath);
iosHelper.addShellScriptBuildPhase(context, xcodeProjectPath);
Expand Down

0 comments on commit 3ba36e3

Please sign in to comment.