We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fe08f8 commit 49e44e5Copy full SHA for 49e44e5
src/valkey-cli.c
@@ -84,7 +84,8 @@
84
#define CLI_HISTFILE_DEFAULT ".valkeycli_history"
85
#define CLI_RCFILE_ENV "REDISCLI_RCFILE"
86
#define CLI_RCFILE_DEFAULT ".valkeyclirc"
87
-#define CLI_AUTH_ENV "REDISCLI_AUTH"
+#define CLI_AUTH_ENV "VALKEYCLI_AUTH"
88
+#define OLD_CLI_AUTH_ENV "REDISCLI_AUTH"
89
#define CLI_CLUSTER_YES_ENV "REDISCLI_CLUSTER_YES"
90
91
#define CLUSTER_MANAGER_SLOTS 16384
@@ -2907,6 +2908,9 @@ static int parseOptions(int argc, char **argv) {
2907
2908
static void parseEnv(void) {
2909
/* Set auth from env, but do not overwrite CLI arguments if passed */
2910
char *auth = getenv(CLI_AUTH_ENV);
2911
+ if (auth != NULL) {
2912
+ auth = getenv(OLD_CLI_AUTH_ENV);
2913
+ }
2914
if (auth != NULL && config.conn_info.auth == NULL) {
2915
config.conn_info.auth = auth;
2916
}
0 commit comments