add relative path compatibility

This commit is contained in:
2017-05-12 19:12:03 +02:00
parent 2925a88e5b
commit 5a307f4c2c
2 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,8 @@ export class Qenv {
missingEnvVars: string[] = []
keyValueObjectArray: IKeyValueObject[] = []
constructor (basePathArg = process.cwd(), envYmlPathArg, failOnMissing = true) {
basePathArg = plugins.path.resolve(basePathArg)
envYmlPathArg = plugins.path.resolve(basePathArg)
helpers.getRequiredEnvVars(basePathArg, this.requiredEnvVars)
helpers.getAvailableEnvVars(this.requiredEnvVars, envYmlPathArg, this.availableEnvVars, this.keyValueObjectArray)
this.missingEnvVars = helpers.getMissingEnvVars(this.requiredEnvVars, this.availableEnvVars)