Do not explicitly require modules from project directory (#713)

* Allow to pass-through projectPath to Builder

* Do not explicitly require modules from project directory
This commit is contained in:
Raphael von der Grün
2019-04-13 17:34:59 +02:00
committed by GitHub
parent b177f84825
commit 4cf3dcfaae
3 changed files with 6 additions and 8 deletions
+2 -2
View File
@@ -24,10 +24,10 @@ const CordovaError = require('cordova-common').CordovaError;
*
* @return {Builder} A builder instance for specified build type.
*/
module.exports.getBuilder = function () {
module.exports.getBuilder = function (projectPath) {
try {
const Builder = require('./ProjectBuilder');
return new Builder();
return new Builder(projectPath);
} catch (err) {
throw new CordovaError('Failed to instantiate ProjectBuilder builder: ' + err);
}