Skip to content

Commit

Permalink
allow for global.rsf_config and process.rsf_config
Browse files Browse the repository at this point in the history
  • Loading branch information
czirker committed May 10, 2022
1 parent d7bbabc commit 8784120
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/configuration-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ export class ConfigurationBuilder<T> {
}

if (this.data == null) {
this.data = process.env.RSF_CONFIG;
if (process.env.RSF_CONFIG) {
this.data = process.env.RSF_CONFIG;
} else if ((process as any).rsf_config) {
this.data = (process as any).rsf_config;
} else if (global.rsf_config) {
this.data = global.rsf_config;
}
}

if (typeof this.data === "string") {
Expand Down

0 comments on commit 8784120

Please sign in to comment.