fix(core): update
This commit is contained in:
parent
7844fdb954
commit
f7362e5444
@ -104,12 +104,16 @@ export class Qenv {
|
|||||||
* gets the required env values
|
* gets the required env values
|
||||||
*/
|
*/
|
||||||
private getRequiredEnvVars = () => {
|
private getRequiredEnvVars = () => {
|
||||||
const qenvFile = plugins.smartfile.fs.toObjectSync(this.qenvFilePathAbsolute);
|
let qenvFile: any = {};
|
||||||
if (!qenvFile.required) {
|
if(plugins.smartfile.fs.fileExistsSync(this.qenvFilePathAbsolute)) {
|
||||||
this.logger.log('warn', `env File does not contain a 'required' Array!`);
|
qenvFile = plugins.smartfile.fs.toObjectSync(this.qenvFilePathAbsolute);
|
||||||
}
|
}
|
||||||
for (const keyArg of Object.keys(qenvFile.required)) {
|
if (!qenvFile || !qenvFile.required || !Array.isArray(qenvFile.required)) {
|
||||||
this.requiredEnvVars.push(qenvFile.required[keyArg]);
|
this.logger.log('warn', `env File does not contain a 'required' Array!`);
|
||||||
|
} else {
|
||||||
|
for (const keyArg of Object.keys(qenvFile.required)) {
|
||||||
|
this.requiredEnvVars.push(qenvFile.required[keyArg]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user