mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Override user and password environment variables with client parameters
This commit is contained in:
parent
44531e5f85
commit
3b9e8a8630
@ -277,11 +277,11 @@ void Client::initialize(Poco::Util::Application & self)
|
||||
*/
|
||||
|
||||
const char * env_user = getenv("CLICKHOUSE_USER"); // NOLINT(concurrency-mt-unsafe)
|
||||
if (env_user)
|
||||
if (env_user && !config().has("user"))
|
||||
config().setString("user", env_user);
|
||||
|
||||
const char * env_password = getenv("CLICKHOUSE_PASSWORD"); // NOLINT(concurrency-mt-unsafe)
|
||||
if (env_password)
|
||||
if (env_password && !config().has("password"))
|
||||
config().setString("password", env_password);
|
||||
|
||||
parseConnectionsCredentials();
|
||||
|
Loading…
Reference in New Issue
Block a user