Compare commits

...

2 Commits

Author SHA1 Message Date
80f35c39aa 3.0.5 2019-01-13 21:35:57 +01:00
87f55773bd fix(core): update 2019-01-13 21:35:57 +01:00
3 changed files with 6 additions and 3 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/qenv", "name": "@pushrocks/qenv",
"version": "3.0.4", "version": "3.0.5",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/qenv", "name": "@pushrocks/qenv",
"version": "3.0.4", "version": "3.0.5",
"private": false, "private": false,
"description": "easy promised environments", "description": "easy promised environments",
"main": "dist/index.js", "main": "dist/index.js",

View File

@ -74,7 +74,6 @@ export class Qenv {
try { try {
envYml = plugins.smartfile.fs.toObjectSync(this.envFilePathAbsolute); envYml = plugins.smartfile.fs.toObjectSync(this.envFilePathAbsolute);
} catch (err) { } catch (err) {
console.log("env file couldn't be found at " + this.envFilePathAbsolute);
envYml = {}; envYml = {};
} }
let envVar: string; let envVar: string;
@ -129,12 +128,16 @@ export class Qenv {
let chosenVar: string = null; let chosenVar: string = null;
if (envVar) { if (envVar) {
this.logger.log('ok', `found ${requiredEnvVar} as environment variable`);
chosenVar = envVar; chosenVar = envVar;
} else if (envFileVar) { } else if (envFileVar) {
this.logger.log('ok', `found ${requiredEnvVar} as env.yml variable`);
chosenVar = envFileVar; chosenVar = envFileVar;
} else if (dockerSecret) { } else if (dockerSecret) {
this.logger.log('ok', `found ${requiredEnvVar} as docker secret`);
chosenVar = dockerSecret; chosenVar = dockerSecret;
} else if (dockerSecretJson) { } else if (dockerSecretJson) {
this.logger.log('ok', `found ${requiredEnvVar} as docker secret.json`);
chosenVar = dockerSecretJson; chosenVar = dockerSecretJson;
} }
return chosenVar; return chosenVar;