From bfe74aeaecdb549481b0df882fe2542fea650625 Mon Sep 17 00:00:00 2001 From: Martijn Walraven Date: Thu, 14 Jan 2016 10:04:12 +0100 Subject: [PATCH] Pass buildOptions as object for new cordova-lib version --- tools/cli/commands.js | 5 +---- tools/cordova/project.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/cli/commands.js b/tools/cli/commands.js index 04a4d3b555..410f54641d 100644 --- a/tools/cli/commands.js +++ b/tools/cli/commands.js @@ -977,10 +977,7 @@ on an OS X system."); buildmessage.enterJob( { title: `building Cordova app for \ ${cordova.displayNameForPlatform(platform)}` }, () => { - let buildOptions = []; - if (!options.debug) { - buildOptions.push('--release'); - } + let buildOptions = { release: !options.debug }; cordovaProject.buildForPlatform(platform, buildOptions); const buildPath = files.pathJoin( diff --git a/tools/cordova/project.js b/tools/cordova/project.js index ae30b37570..50620ec07a 100644 --- a/tools/cordova/project.js +++ b/tools/cordova/project.js @@ -185,7 +185,7 @@ ${displayNameForPlatform(platform)}`, async () => { // Building (includes prepare) - buildForPlatform(platform, options = [], extraPaths) { + buildForPlatform(platform, options = {}, extraPaths) { assert(platform); const commandOptions = _.extend(this.defaultOptions,