mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-23 02:00:49 +00:00
Merge pull request #35020 from ClickHouse/preprocessed_config_in_yaml
Always write preprocessed config in XML format
This commit is contained in:
commit
01f8eab2da
@ -664,6 +664,10 @@ void ConfigProcessor::savePreprocessedConfig(const LoadedConfig & loaded_config,
|
|||||||
new_path.erase(0, main_config_path.size());
|
new_path.erase(0, main_config_path.size());
|
||||||
std::replace(new_path.begin(), new_path.end(), '/', '_');
|
std::replace(new_path.begin(), new_path.end(), '/', '_');
|
||||||
|
|
||||||
|
/// If we have config file in YAML format, the preprocessed config will inherit .yaml extension
|
||||||
|
/// but will contain config in XML format, so some tools like clickhouse extract-from-config won't work
|
||||||
|
new_path = fs::path(new_path).replace_extension(".xml").string();
|
||||||
|
|
||||||
if (preprocessed_dir.empty())
|
if (preprocessed_dir.empty())
|
||||||
{
|
{
|
||||||
if (!loaded_config.configuration->has("path"))
|
if (!loaded_config.configuration->has("path"))
|
||||||
|
Loading…
Reference in New Issue
Block a user