Skip to content

Commit

Permalink
Checks 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 3ba36e3 commit 9e2a4df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/before_plugin_rm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

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;

// Remove the build script that was added when the plugin was installed.
if (platforms.indexOf("ios") !== -1) {
if (platforms.indexOf("ios") !== -1 && os.platform() === 'darwin') {
var xcodeProjectPath = utilities.getXcodeProjectPath(context);
iosHelper.removeShellScriptBuildPhase(context, xcodeProjectPath);
}
Expand Down

0 comments on commit 9e2a4df

Please sign in to comment.