Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
2357699f3e | |||
01f5784488 | |||
80f35c39aa | |||
87f55773bd |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/qenv",
|
||||
"version": "3.0.4",
|
||||
"version": "3.0.6",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/qenv",
|
||||
"version": "3.0.4",
|
||||
"version": "3.0.6",
|
||||
"private": false,
|
||||
"description": "easy promised environments",
|
||||
"main": "dist/index.js",
|
||||
|
@ -1,4 +1,5 @@
|
||||
import * as plugins from './qenv.plugins';
|
||||
plugins.smartlog.defaultLogger.enableConsole();
|
||||
|
||||
export interface IKeyValueObject {
|
||||
key: string;
|
||||
@ -74,7 +75,6 @@ export class Qenv {
|
||||
try {
|
||||
envYml = plugins.smartfile.fs.toObjectSync(this.envFilePathAbsolute);
|
||||
} catch (err) {
|
||||
console.log("env file couldn't be found at " + this.envFilePathAbsolute);
|
||||
envYml = {};
|
||||
}
|
||||
let envVar: string;
|
||||
@ -129,12 +129,16 @@ export class Qenv {
|
||||
|
||||
let chosenVar: string = null;
|
||||
if (envVar) {
|
||||
this.logger.log('ok', `found ${requiredEnvVar} as environment variable`);
|
||||
chosenVar = envVar;
|
||||
} else if (envFileVar) {
|
||||
this.logger.log('ok', `found ${requiredEnvVar} as env.yml variable`);
|
||||
chosenVar = envFileVar;
|
||||
} else if (dockerSecret) {
|
||||
this.logger.log('ok', `found ${requiredEnvVar} as docker secret`);
|
||||
chosenVar = dockerSecret;
|
||||
} else if (dockerSecretJson) {
|
||||
this.logger.log('ok', `found ${requiredEnvVar} as docker secret.json`);
|
||||
chosenVar = dockerSecretJson;
|
||||
}
|
||||
return chosenVar;
|
||||
|
Reference in New Issue
Block a user