From bb91889fdbe6d7d630b0c49f20172a366c35f3d1 Mon Sep 17 00:00:00 2001 From: gagdiez Date: Mon, 4 Mar 2024 14:06:13 +0100 Subject: [PATCH 1/2] fix: display warning on duplicated env vars --- config.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config.js b/config.js index 6f49f8c5..4073b114 100644 --- a/config.js +++ b/config.js @@ -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; From 4f4d1625e9c71185939623352a8161878bccc064 Mon Sep 17 00:00:00 2001 From: gagdiez Date: Mon, 4 Mar 2024 14:20:26 +0100 Subject: [PATCH 2/2] Release 4.0.10 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cf914bba..d5fb9b32 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "near-cli", - "version": "4.0.9", + "version": "4.0.10", "description": "Simple CLI for interacting with NEAR Protocol", "engines": { "node": ">= 16"