Fix duplicate options on args push

reqiure replaced with fs.readFileSync
This commit is contained in:
SVV-team 2019-11-01 17:19:13 +02:00 committed by GitHub
parent 06337a8914
commit 0144be7b4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,7 +101,7 @@ class Handler {
return new Promise(resolve => { return new Promise(resolve => {
const versionJsonPath = this.options.overrides.versionJson || path.join(this.options.directory, `${this.options.version.number}.json`); const versionJsonPath = this.options.overrides.versionJson || path.join(this.options.directory, `${this.options.version.number}.json`);
if (fs.existsSync(versionJsonPath)) { if (fs.existsSync(versionJsonPath)) {
this.version = require(versionJsonPath); this.version = JSON.parse(fs.readFileSync(versionJsonPath));
resolve(this.version); resolve(this.version);
return; return;
} }