Skip to content

Commit

Permalink
fix: display warning on duplicated env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
gagdiez committed Mar 4, 2024
1 parent e0bce38 commit bb91889
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
const DEFAULT_NETWORK = process.env.NEAR_ENV || process.env.NEAR_NETWORK || 'testnet';
const DEFAULT_NETWORK = process.env.NEAR_NETWORK || process.env.NEAR_ENV || 'testnet';

if (process.env.NEAR_NETWORK && process.env.NEAR_ENV){
console.log(`Warning: NEAR_NETWORK and NEAR_ENV are both set! We will use NEAR_NETWORK (${process.env.NEAR_NETWORK})\n`);
}

function getConfig(env) {
let config;
Expand Down

0 comments on commit bb91889

Please sign in to comment.