| 1852 | } |
| 1853 | |
| 1854 | static void parseEnv() { |
| 1855 | /* Set auth from env, but do not overwrite CLI arguments if passed */ |
| 1856 | char *auth = getenv(REDIS_CLI_AUTH_ENV); |
| 1857 | if (auth != NULL && config.auth == NULL) { |
| 1858 | config.auth = auth; |
| 1859 | } |
| 1860 | |
| 1861 | char *cluster_yes = getenv(REDIS_CLI_CLUSTER_YES_ENV); |
| 1862 | if (cluster_yes != NULL && !strcmp(cluster_yes, "1")) { |
| 1863 | config.cluster_manager_command.flags |= CLUSTER_MANAGER_CMD_FLAG_YES; |
| 1864 | } |
| 1865 | } |
| 1866 | |
| 1867 | static sds readArgFromStdin(void) { |
| 1868 | char buf[1024]; |